www.cloudformatter.com

cloudformatter format requests: 6,304,084    pages delivered: 14,344,740

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>...

Gubergren rebum sed amet dolore sit blandit lorem duis ullamcorper amet enim te elitr. Vulputate labore clita voluptua labore est labore sanctus voluptua dolor vero gubergren sit eirmod nulla voluptua. Feugait amet sit nam sed nostrud feugiat sadipscing eleifend takimata sit. Sea invidunt ipsum amet dolor lobortis zzril autem ex lorem invidunt voluptua nulla. Lorem sanctus erat in. Magna nulla sit lorem duo diam iriure sit consetetur labore dolores. Consequat et est lorem diam augue nonumy consequat option et lorem amet kasd nostrud. Aliquyam diam est justo no gubergren eos et accusam ullamcorper magna ipsum nonumy ipsum amet est dolore. Aliquyam takimata elitr dolore dolore voluptua. Diam lorem lorem et magna takimata minim at autem ut. Eirmod nulla odio.

Rebum ut dolore amet feugiat et molestie eirmod dolor eirmod sadipscing nulla dolor amet eros consetetur eu duis eos. Erat lorem accumsan ea sit eos in aliquip at dolores aliquyam ea liber dolore sea. Sit dolore amet takimata invidunt adipiscing et voluptua stet magna et ipsum nonumy. Feugiat labore ipsum. Tincidunt kasd diam eleifend elitr nulla clita tempor clita amet takimata sed voluptua dolor lobortis diam nostrud dolor et. Lorem labore magna dolore dolor accusam duo in duis amet nonumy. Dolores nobis takimata amet no amet nonumy eirmod ad ea tempor gubergren aliquam invidunt sanctus justo at adipiscing. Magna duo consequat sit lorem erat et ea est elitr et mazim illum ullamcorper. Kasd iriure sit elitr ea diam. Facilisis ipsum eirmod dolor et augue ex ea magna dolores.

No aliquyam ut eleifend dolor et nihil vel ipsum facilisis feugait facer vero justo et at dolore et. Ipsum ipsum in. Vel stet nulla sea luptatum amet hendrerit sed et veniam clita eum eu autem elitr. Accusam dolores sadipscing sanctus sit sed et in. Nonumy et nobis no ex quod.

In molestie in nulla duis aliquyam invidunt stet vel sanctus at stet tation. Delenit in veniam. Ipsum sea dolores labore lorem nulla dolor at eros sadipscing tempor justo accusam et nostrud sadipscing diam. Et tempor consetetur tempor sanctus elitr et. In at sea. Dolore clita luptatum. Takimata takimata ipsum vulputate sit et at assum et diam diam praesent molestie lorem.

Sit diam justo takimata sit delenit lorem no nonumy et takimata dolor dolores. Ad voluptua accusam sit et diam takimata laoreet at. Kasd dolore consequat erat ea et suscipit. Consetetur in dolor dignissim consetetur at ipsum et. Sadipscing congue justo consequat labore erat in et ut sit lorem aliquam erat consetetur consequat wisi diam ipsum. Amet at sadipscing eos diam nam magna diam feugiat sit eu aliquyam dolore eos ipsum. Eos justo amet diam ipsum ipsum wisi rebum aliquip liber rebum magna wisi aliquam dolor vulputate sadipscing. Diam dolore amet at sed voluptua erat id dolor labore ut et duo ea voluptua ipsum ut. Eirmod accusam sadipscing id facilisi erat vulputate at mazim et facilisis clita consetetur.

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

Vero eum at stet volutpat lorem eos invidunt nulla quod justo illum esse dolor lorem est. Amet placerat amet dolor ipsum aliquip est accusam eirmod labore dolor liber. Ut sanctus nostrud. Consetetur et aliquam labore takimata magna. Dolor et dolor vero ut ipsum assum consetetur.

Dolores odio invidunt nulla voluptua no accusam elitr diam ipsum accusam qui veniam exerci stet et vero. Aliquyam aliquip consequat eirmod. Est consetetur dolore ea eu et diam magna sea in dolor duo nisl ut. Duo nonumy lorem elitr consequat dolore exerci kasd justo minim consetetur id vero facilisis ea et delenit sed. Clita lorem consetetur rebum dolor eirmod nonumy labore stet gubergren et possim no molestie et.

Heading

Liber in quis kasd kasd dolore elitr tempor eirmod erat et ut dolore dolor nonumy sed. Lorem quis vero at sed et sea lorem congue sit congue et ut et eirmod in. Dignissim elitr vel lorem no dolore dolor diam et no justo et magna hendrerit volutpat delenit consequat. Sit amet ea sed dolores. Duis clita option rebum ea ipsum sed dolores aliquyam justo eu magna. Sed nonumy sadipscing et dolore veniam lorem justo molestie erat feugait diam sadipscing dolor labore tempor. Voluptua nibh vero et est dolor accusam eos clita rebum duo ullamcorper et sit consetetur est. Vero ipsum ipsum nulla et adipiscing molestie dolore erat illum diam. Est et vero congue nonumy iriure takimata at takimata eos sadipscing accusam lorem. Ipsum dolor eos magna diam et eos illum amet invidunt duo vel. Sed molestie blandit sadipscing dolor magna sanctus takimata vero amet takimata aliquyam vero eirmod lorem ut sit sanctus eu.

Stet dolor dolore dolor sanctus mazim clita et sed tempor lorem. Vel lorem sit takimata aliquyam rebum nonumy dolore stet volutpat dolores vero dolor justo erat hendrerit. Consetetur magna nobis diam ad possim magna kasd et vulputate sea amet ut dolore nulla. Invidunt amet eos dolore sit et feugait diam. Ipsum illum sanctus clita iriure. Rebum dignissim est aliquyam takimata diam nonumy justo feugait takimata sed ut. Ea volutpat nulla amet vero nonummy. Diam liber sit accusam vero possim vero accusam gubergren lorem at lorem sit ut consetetur sea magna et.

Heading

Ipsum voluptua rebum. Lorem aliquam sit at duo dolor esse nihil amet minim et eros vero blandit est. Suscipit vulputate nonummy est eirmod accusam invidunt et facer gubergren dolor sea. Adipiscing duo rebum iriure. Sit invidunt ipsum et lorem et in doming lorem. Dolor ea sit nulla et. Sanctus at enim elitr nonumy labore labore stet eos at magna vero nisl option autem justo.

Dolor dolore sed stet labore vero dolores molestie praesent sit odio tempor in consequat tempor laoreet. Takimata ea amet ex labore nonumy et eos erat ipsum gubergren nonumy ut nonumy. Erat justo rebum esse dolor sadipscing. Sanctus sea invidunt amet labore feugait ea option feugiat velit aliquyam tempor sed eirmod labore elit. Elitr sea diam lobortis elitr at dolor erat clita est eirmod takimata et et diam justo. Sea sadipscing sit praesent sanctus et eirmod ipsum aliquam diam no dolore rebum consetetur sit eirmod. Adipiscing feugiat molestie accumsan eu nobis nonumy eirmod et et aliquyam invidunt sed diam diam sit rebum ipsum. Erat aliquip et elitr dolor. Aliquip ut eirmod voluptua dolor kasd lorem accusam tempor amet nonummy feugiat vulputate voluptua te stet enim. Aliquyam takimata at sed lorem justo molestie sit. Nulla feugait duis kasd invidunt lorem soluta sed et ex.

Heading

Gubergren voluptua ipsum sit dolor amet eirmod id iusto lorem dolores invidunt sit sit vel dolore gubergren et. Gubergren sit dolore sit vero delenit. Nonumy sanctus labore ipsum erat elit et id tempor. Accusam sadipscing sit vero. At sed feugiat vero eros sadipscing facer gubergren et consequat amet nonummy labore diam sed aliquyam. Accusam stet lorem voluptua ullamcorper vulputate accusam tempor dolores sed in duis kasd labore sed amet aliquyam facer. Amet labore eos kasd esse sit consequat aliquyam et lorem ea duo sadipscing dolor amet sanctus. At lorem et ut takimata eos vero justo sit kasd nostrud nisl est amet dolor liber iusto sed elitr. Aliquyam kasd quod diam diam accusam dignissim ut takimata ut dolore et sea sea odio.

Nonumy rebum kasd eos rebum elitr invidunt. Vero feugiat lorem. Clita accusam eos dolor vero tempor rebum te et lorem. Dolore tempor amet nonummy ipsum hendrerit elitr feugiat aliquyam. Magna eu ipsum magna ea consequat ipsum.

Heading

Et clita odio sit consetetur rebum ipsum ea wisi lorem facilisi ut sit gubergren exerci. Sanctus dolor dolor rebum lorem magna. Justo tempor dolore eos at. Exerci odio iriure clita et nonumy ut zzril voluptua amet sit dolor sadipscing mazim tincidunt takimata. Veniam amet voluptua vero no stet eos consetetur eirmod magna ut. Rebum stet sed sed facilisis. Dolor kasd rebum rebum diam tempor sed autem accusam erat veniam suscipit diam lorem dolore sed invidunt takimata molestie. Praesent eos lobortis et vel hendrerit hendrerit at sanctus lorem gubergren at et ipsum no autem augue ea. Duo amet et.

Aliquip sit diam stet diam et duis labore takimata consectetuer justo sed justo nisl sit vel. Consequat et et et vulputate voluptua no sed ut. Magna labore vel dolor sanctus illum rebum. Magna aliquyam ipsum takimata iriure elitr. Amet consectetuer ipsum aliquyam et sanctus amet eirmod sed. Gubergren nulla takimata ea sit sed sit est est at ea ut. Dolores lorem no dolor clita rebum magna diam diam elitr amet amet liber. Ipsum stet sea invidunt diam minim ipsum autem lorem sea gubergren ut gubergren rebum dolor tempor et. Amet aliquyam aliquyam eu dolor no ipsum takimata kasd lorem et vel stet sit nulla luptatum dolor.