www.cloudformatter.com

cloudformatter format requests: 2,745,301    pages delivered: 7,148,847

Pass-Through XSL FO Styling

xportability LLC

Pass-Through XSL FO Styling

http://www.cloudformatter.com

Note:

We implemented the spacialized attribute fostyle to carry this information. Because the browser just ignores this, you must be careful to structure it correctly for processing. The proper structure is name: value; noting that the ":" after name is followed by a space and the ";" between items is also followed by a space.

In some instances you may wish to pass through XSL FO attributes that are not supported in HTML. This is an example, while the text in the HTML has a brown color applied, we have applied a CMYK color for the PDF generation through the use of the fostyle attribute. All fostyle attributes are applied after HTML css and also after direct attributes and override those in the HTML. This paragraph also has text-align justify in the HTML and font-stretch, font-size-adjust and hyphenate in the PDF output. The fostyle attribute is attached right in the HTML, just like style and uses the same structure internally as style.

The code for the paragraph above looks like this:

<p style="color: brown; text-align:justify;"
    fostyle="text-align-last: left; 
    font-stretch: wider; 
    font-size-adjust: 0.6; 
    hyphenate: true; 
    color: rgb-icc (255, 255, 0, #CMYK, .1, .2, .7, .5);">In some instances ...

Keeps of Various Kinds

Another common use for passing through custom elements is for properties that have specific meaning in a pagination situation like "keeps". There are several forms of keeps that can help you organize content so it is glued together as you like it.

The following are the most commonly used keeps:

  • keep-together.within-page: set to "always" and used to keep a block of content always together in a single page
  • keep-with-next.within-page: set to "always" and used to keep a block of content glued to the next one always together in a single page
  • keep-with-previous.within-page: set to "always" and used to keep a block of content glued to the previous one always together in a single page
  • keep-together.within-line: set to "always" and used to keep a span of content glued always together in a single line

The following shows some demonstrations of these capabilities.

Keeping Together Within a Page

This paragraph, the instructions and the following three para's of LoremIpsum text are surrounded by a <div> with keep-together.within-page as always, like this:

<div fostyle="keep-together.within-page: always;">
    <p>This paragraph, the instructions and the following five para's of LoremIpsum text are surrounded 
    by a <div> with "keep-together.within-page" as "always", like this:</p>...

Et vulputate at. Sit aliquyam consetetur ipsum feugiat et et aliquyam justo sea nisl. Stet stet eum duis voluptua amet minim hendrerit aliquam aliquip vel magna nibh tation diam rebum imperdiet. Sanctus amet vero est sea eum diam autem justo nonumy duo sed rebum tempor sed dolores. Ut zzril erat stet dolore sit labore lorem ea duo stet at et sit duo. Aliquam dolor et et facilisi sanctus stet duo stet. Justo vero feugait lorem consetetur lorem elitr et. Vel praesent justo at stet diam sit vero et wisi at ipsum voluptua.

Sea invidunt takimata rebum delenit veniam clita kasd sit dolor et gubergren sit accumsan. Gubergren ea luptatum accusam. Invidunt ex diam enim magna nisl sanctus sit accusam est eu. Vero dolore rebum takimata sit clita suscipit dolore accusam nam justo et lorem. Sanctus ipsum dolores.

Amet est stet sed hendrerit sea ut consectetuer sadipscing invidunt et facilisi amet lorem id ut. Nonumy sit stet tempor sea consetetur. Consequat illum sanctus ipsum amet et takimata vel ea vel amet dolor. Eos accusam duo et ipsum luptatum sadipscing iusto ipsum vero. Lorem iriure no nulla gubergren quod diam elitr nibh sed clita sea. Est sed voluptua diam justo hendrerit ut est lorem magna ullamcorper tation commodo sed. Kasd sit clita commodo. Esse option est takimata nobis ea diam.

Kasd nobis consetetur rebum et et consequat diam et justo at voluptua vel consectetuer takimata duo ut consequat dolor. Magna dolor dolores eos kasd zzril at vero ipsum id et tempor no amet tempor eos lorem feugait. Takimata vero accusam blandit sadipscing vero duo sanctus rebum ipsum. Et delenit tempor liber sed dolores molestie clita ut labore quis. Tempor lobortis ea nonumy volutpat vulputate elitr labore et quis ea consetetur erat gubergren diam vero at dolor quod. Facilisis sit sed accumsan lorem labore duo sed nisl diam diam. Autem labore labore sit duis ut sit sit in rebum vulputate sanctus illum consetetur hendrerit duo diam.

Blandit sed lorem clita sed. In eos erat justo dolore dolor luptatum eirmod stet aliquyam delenit at. Sit diam dolor. Et zzril diam est vero. Elit lorem clita aliquyam ex vero consetetur duis et euismod vel est. Vulputate dolor sea consectetuer molestie mazim erat vel clita euismod kasd ea feugiat laoreet ut sed sit dolor. Volutpat velit elit stet sit dolores labore lorem molestie feugiat takimata wisi stet elitr sed at odio diam. Vulputate stet accusam et. Hendrerit sed magna duo est sea et at sit veniam liber in takimata.

Thus all of this content from the header through this paragraph is together on a single page.

Keep Heading with Para and Table

A common practice in print documents is keeping together headings and some of the following lines of a paragraph so no heading is orphaned at bottom of a page and at least a few lines of text from any paragraph stay together.

What follows this are a series of headings and LoremIpsum paragraphs. The headings all have "keep-with-next.within-page" as "always" which will at least glue them to the paragraph. The paragraphs all have widows of "3" and orphans of "3" which will attempt to glue together at least three lines of paragraph at the bottom and top of any page. The LoremIpsum paragraphs are randomly generated on refresh of the page so you can test various layouts just by refresing and printing again.

Heading

Blandit dolore dolor labore sit nonumy rebum minim takimata lobortis dolor. Magna dolores elitr sit dolor enim lorem dolore tempor invidunt et vel no. Dolore wisi dolor volutpat ut volutpat. Accusam nonumy et gubergren tempor accusam erat et facilisis. Dolore no at tincidunt no velit et nostrud aliquyam vero amet sanctus eu sanctus invidunt.

Nam ad sed accusam ipsum nihil hendrerit kasd nisl et ut tincidunt sadipscing justo euismod at duis et vero. Stet vero erat erat clita et diam dolor ipsum nonummy rebum feugait dolore sit. Clita et ipsum aliquyam eu labore stet et volutpat rebum magna odio elitr. Magna invidunt et in esse esse vel molestie sed. Duis lobortis ea dolor at sea ut amet dolor diam at no in odio ipsum accusam sea et elit. Ea commodo enim ipsum kasd.

Heading

Sit lorem elitr dolor sit tation consetetur. Et ipsum zzril amet gubergren eos consequat. Magna erat et sea qui autem ea aliquyam consetetur lorem dolor quis dolor. Accusam eleifend ea. Eros sit sanctus dolor sit volutpat eleifend sanctus gubergren et sea sed accusam. At consetetur tempor duo eum erat.

Dolores kasd dolores sed elitr lorem dolore dolore autem. Aliquyam no wisi nonumy invidunt stet consequat invidunt dolore at ut no esse kasd illum ut ut esse odio. Takimata minim sadipscing ipsum erat augue dolores gubergren at sit eos. Te amet dolore amet lorem lorem sea eos hendrerit et et. Hendrerit in eos justo lobortis diam ea amet erat sadipscing no congue. Minim dolore et sit in ea id velit. Vel diam molestie exerci dolore no erat ipsum stet. Sea aliquyam consectetuer lobortis. Dolor accusam ut et diam eirmod. Dolores dolor id in consetetur invidunt nonummy.

Heading

Sit eos stet clita rebum cum lorem ut sit et dolor aliquyam eos lorem et aliquyam elitr dolores ipsum. Aliquyam vulputate minim et nulla sadipscing dolore stet dolor tempor consetetur velit clita magna nulla takimata wisi elitr. Clita eirmod nibh qui clita invidunt consequat rebum imperdiet magna gubergren dolor justo facilisis. At ullamcorper nonumy nam. Et et invidunt invidunt rebum voluptua facilisis justo sed gubergren rebum et. Laoreet lobortis erat et. Aliquip diam consetetur stet aliquip takimata nonummy duo voluptua kasd diam takimata at dolore stet diam eirmod sed ipsum. Est velit gubergren et eirmod velit at commodo justo clita at est dignissim esse. Ut et nulla praesent gubergren ut. Eu et sadipscing et labore ipsum labore sanctus amet stet diam. Et at no sed tation duo molestie et lorem consequat ut et est lobortis labore zzril at.

Elitr dolores no nonumy clita eos lorem aliquip nisl magna stet ullamcorper nonummy sed. Clita amet invidunt elitr dolor amet autem at et sit adipiscing odio. Sit ipsum molestie option labore sanctus ut ipsum diam dolores dolor nonumy et adipiscing diam sit velit eos diam. Et et labore. Et ex vero delenit autem sadipscing eos magna tempor sed sanctus eirmod nostrud et. Accumsan tempor sed eu consequat duo lorem voluptua lorem wisi nonumy autem eos. Eros aliquyam eos duo ut et accusam kasd nonumy ipsum luptatum invidunt accusam ipsum. Diam sea ut. Et illum amet tation elitr duo aliquyam aliquyam at vero sit takimata facilisis at exerci quis facilisis dolore.

Heading

Dolores option elitr eirmod labore stet wisi erat sit amet aliquyam consetetur magna. Molestie facilisi at tempor dolore amet consetetur dolor ea at. Eum invidunt kasd nulla veniam et dolor hendrerit justo tempor accusam et duis et. Erat amet erat aliquyam aliquip erat at ut et dolores esse at sit sit kasd ea ut dolor facilisis. Diam lobortis praesent exerci no elitr est sit nostrud ea amet.

Ipsum augue diam et ut volutpat ut accusam dolor lobortis erat voluptua amet clita sit feugait. Consequat invidunt ut dolor dolor dolores dolor ipsum accusam nostrud dolore augue quod ullamcorper ut elitr. Ipsum at dolores elitr amet. Sea qui vero dolor lorem consequat vel aliquyam lorem lorem diam aliquyam voluptua exerci. Sit sit voluptua dolor vel no velit no diam sit clita et nisl. Exerci sed rebum invidunt at sed sed sed lorem commodo diam nonumy ipsum sed kasd diam diam sed nobis. Erat duis ut suscipit ipsum at ipsum iriure zzril nonummy gubergren. Erat et kasd iriure voluptua tempor amet nonummy elitr suscipit sadipscing. Stet sea kasd kasd dolor eirmod sea dolor amet.

Heading

Rebum et esse wisi ex eum ex. Lobortis eirmod vulputate kasd dolore dolor amet magna amet. Accusam et lobortis aliquip magna eum erat sit dolor delenit feugiat eirmod at amet et lorem dolor sit. In wisi tempor in sed ipsum exerci vero vel erat consetetur dolore. Nulla diam sed stet. Sed justo elitr justo tation ipsum dolor dolor illum stet dolore consetetur dolore nonumy tempor no at at. Iriure facilisis ut placerat vero feugiat duo ipsum. Magna aliquyam ipsum assum lorem est justo consetetur clita lorem no ut eirmod voluptua. Id luptatum dolor sit accusam amet ipsum dolor. Kasd accusam consequat sadipscing iriure molestie ut hendrerit lorem accusam duis possim. Tempor nonumy sed et sadipscing et.

Consequat nisl qui eleifend sit takimata sadipscing accusam voluptua. Eos clita luptatum tincidunt ipsum facer diam luptatum at nostrud lorem ea ipsum amet aliquyam iriure eu rebum. Sit dolor et ipsum amet sit invidunt nulla quis duis amet duis blandit diam et sea. Lorem nulla elitr sanctus sadipscing amet placerat nulla et. Dolores iriure accusam invidunt dolor erat dolor voluptua molestie facilisi rebum et kasd clita voluptua sit dolores erat. Justo vulputate accusam labore. Nonummy ipsum et iriure sea sea consetetur ipsum clita tempor justo. Diam dolor volutpat aliquip erat dolor facilisis dolor sed erat clita aliquyam nulla feugiat diam. Nihil rebum duis eum exerci lorem possim amet diam sea. Facilisis dolor gubergren sea eirmod sadipscing assum vel assum. Sadipscing diam invidunt feugait no feugait ut diam tincidunt lorem augue autem.