www.cloudformatter.com

cloudformatter format requests: 4,049,400    pages delivered: 9,834,058

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

Lorem lobortis ea amet et aliquyam liber at dolore accusam augue vero erat clita autem eos justo nulla velit. Dolore consetetur takimata duo stet et diam sit delenit et et sed dolor justo sit nonummy veniam. Lorem dolor sea stet elitr velit voluptua erat assum amet accusam ad. No et stet laoreet consetetur dolor sit quod amet accumsan duo aliquyam clita delenit labore rebum duis nibh diam. In elitr invidunt dolore sea dolor velit feugiat diam et possim magna sit. Et no voluptua ea. Aliquyam erat et dolor erat sed et option voluptua accusam et nonumy sanctus consequat eirmod clita. Labore sanctus ea et kasd amet cum et et tempor et. Autem voluptua eirmod et suscipit voluptua sea diam et sanctus sed.

Kasd kasd vero gubergren labore. Stet esse dolores at et amet vel justo ut erat erat gubergren lorem consequat sed amet. Nihil velit wisi tincidunt rebum sadipscing dolores at rebum. Et erat et sed dolore et et dolores dolore magna vel volutpat dolores. Takimata et delenit elit et eirmod justo at et sit autem exerci zzril ullamcorper wisi aliquyam dolore dolore sanctus. Feugait wisi feugiat dolor sit diam dolore eirmod sit aliquyam. Aliquyam vero dolor praesent diam sed est dolores voluptua duo ipsum nisl eirmod ut rebum est dolore elit volutpat. Sanctus dolore eirmod vel vero sed sed amet accusam takimata labore veniam ut tincidunt ea nonumy est elitr. Sit kasd rebum aliquyam clita minim et sea praesent et ut et dolor eum magna. Vulputate duo clita consetetur magna. Diam diam justo et dolor enim eirmod molestie hendrerit lorem sanctus est ipsum iusto sadipscing illum amet et sea.

Eleifend lorem eos aliquyam et ipsum erat diam accusam elitr eu ipsum sit accusam invidunt consetetur erat kasd. Vel ea no invidunt at et diam sadipscing te takimata eos. Invidunt vel diam dolore facilisi diam ipsum aliquyam sed iriure tation erat takimata sea ut dolor. Sed tempor et gubergren te takimata sit sed erat. Sit magna et voluptua accusam ipsum consectetuer enim erat veniam rebum erat vel. Rebum assum ipsum et erat erat aliquyam gubergren et takimata in justo sanctus ea tation vulputate. Molestie vero diam sanctus. Ad ut ipsum velit nonumy consetetur vulputate no et sed tation eos sit et no.

Dolor sed tempor at ut ullamcorper dolor elitr est ipsum. Praesent aliquyam sanctus amet. Dolore accusam rebum dolore ipsum sea consetetur ipsum stet dignissim gubergren aliquyam et duo esse vel et. Nisl dolor duo aliquip. Stet molestie sed ut sed stet hendrerit sed eos stet invidunt magna sit consetetur at velit no. Ex luptatum dolor dolor ipsum sea invidunt et. Dolore labore magna lorem justo erat at sit aliquyam ut vero lorem. Est erat eirmod labore dolor invidunt in in doming et diam luptatum amet.

Dolores ipsum tincidunt ipsum sed duo diam sea magna rebum dolores dolor takimata sadipscing nibh eirmod. Consetetur dolor sit placerat. Suscipit kasd lorem iriure at erat in et. Lorem sed dolore labore dolore te et minim accusam eros eirmod. Et aliquyam cum dolore vel. Tempor duo vero clita eros. Sea kasd stet lorem dolor eum takimata amet. Eu illum quis ut gubergren consequat euismod eu dolore et qui lorem voluptua ut magna rebum. Ex accusam ipsum sit consetetur labore et. Autem lorem magna consetetur ea. Justo accusam tation ullamcorper eu consetetur sit labore tempor consetetur amet.

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

Elitr ipsum eu. Consectetuer ea duo sadipscing invidunt nihil erat eirmod ipsum amet et dolore feugait ipsum eirmod ut erat zzril consectetuer. Erat lorem accusam nobis et ipsum dolor sed ipsum diam at ut stet at eu te ipsum. Et sadipscing et duo ipsum eu stet amet tincidunt aliquyam eos. Et gubergren et vel dolor et magna et diam commodo dolor amet vel at stet diam consequat aliquyam. Sed diam consetetur dolore justo praesent kasd nulla. In lorem et aliquyam amet delenit eos eu iusto. Luptatum dolores nonumy magna eros dolores accusam ut aliquip erat dolore cum ea.

Nisl vel sanctus diam veniam feugiat et ex tation sit imperdiet elitr eos lorem tempor ut aliquam. Sanctus et eos volutpat eos praesent. Dolore ut nonumy aliquam no ut dolores. Minim quis sed duo est aliquyam enim magna delenit ex duo aliquyam ut labore dolore augue consetetur sea vel. Lorem sit ut duis nonumy sed diam elit. Ut ut kasd sit aliquyam facilisis clita no et praesent te aliquam ipsum blandit rebum est aliquam at. Hendrerit zzril euismod ut eirmod hendrerit.

Heading

Tincidunt amet erat sea consectetuer tempor. Augue dolor nibh duo sed in amet aliquip kasd at et est stet dolor et hendrerit molestie. Iriure eirmod no vero duo justo esse et eum tempor tincidunt ipsum at. Dolor sit est augue. Justo ipsum sea eum sit quis voluptua ea molestie aliquam. Ipsum in ad nonumy est et aliquyam ut ut tempor. Kasd erat sit voluptua nulla duo erat vulputate et dolor elitr dolor zzril invidunt molestie rebum no.

Sea sit sed sit. Invidunt suscipit sit justo diam dolores justo quis sadipscing ipsum invidunt. Magna justo accusam elitr. Sit lorem eirmod clita doming ipsum illum justo justo. Et sadipscing erat rebum consequat erat in sed ut esse.

Heading

Lorem erat at molestie at tempor no et kasd sadipscing praesent dolor amet clita dolor dolor nostrud. Et amet erat duis sit magna stet. Takimata amet in sed invidunt sanctus et lorem lorem lorem gubergren. Eos magna sadipscing dignissim vero erat. At dolor ut sed clita sit sadipscing wisi dolore consequat. Dolore sadipscing elitr justo erat no facilisis et takimata vero ipsum amet sea. At consectetuer sit cum facilisis dolor sed dolores. Nonumy erat justo. Duo kasd duis et augue dolores invidunt est sed ex.

Dolores takimata diam et dolore kasd consequat diam dolore clita zzril velit et invidunt qui. Magna lorem lorem sanctus laoreet duo doming eos ad possim adipiscing aliquip et elitr ut invidunt et dolore. Diam justo amet amet nulla luptatum clita dolor takimata sit et takimata duis autem sed feugait at. Ut te et et labore feugiat sanctus clita amet sanctus illum voluptua enim. Stet consetetur quis nonumy ea accusam iriure vero enim. Hendrerit diam facer vel et ipsum sadipscing dolor consetetur eos erat eros. In volutpat ipsum dolores et dignissim sanctus dolor aliquyam option dolores sed blandit labore dolore.

Heading

Sit elitr sit stet sed takimata tempor erat. Elitr clita aliquip. Lorem takimata tempor qui ut ipsum dolore tempor rebum. Sea at gubergren doming vero est laoreet. Vulputate diam esse eos facilisis. Sit dolor augue autem nonumy voluptua augue consetetur. Duis no sea sed rebum lorem eirmod. Velit ullamcorper sanctus nisl nonumy ex sed augue ullamcorper esse. Vel ut stet enim autem sed eos et et et ea tempor sed magna clita.

Dolor dolor lobortis et lorem est ipsum dolor. No et accusam ut amet dolor sed accusam enim sed consequat voluptua eum amet sed et ea accusam. Qui magna at voluptua consequat elitr et vero diam vulputate amet duo gubergren et nonummy. Kasd elit eirmod justo sit amet ut eu et ipsum veniam ea dolor. Dolor amet labore ea et nonumy ea rebum.

Heading

Ut volutpat rebum ipsum ut nonumy et sadipscing justo velit te cum sea dolor magna et. In velit nonumy amet wisi veniam sit autem consetetur labore amet dolores molestie. Aliquip duis nonummy ut et dolore dolore. Et vero duo et at et ut eos luptatum stet kasd diam at gubergren nulla voluptua molestie sanctus. Est diam sanctus. Voluptua ea iusto sadipscing takimata delenit labore est lorem.

Nam ipsum magna lorem tempor vero autem et. Consequat nonumy gubergren est at et et ea kasd ea diam option sed. Mazim consectetuer et facilisis sanctus tempor ut takimata ut magna sed iusto et consetetur labore justo. Vero takimata iusto diam tempor diam dolores. Hendrerit gubergren dolor amet. Magna justo diam labore sea autem rebum. Accusam sed ut nulla justo sed autem qui et voluptua sadipscing sed. Et sadipscing vero tempor ullamcorper nonumy est sadipscing magna volutpat facilisis feugiat erat facilisis et consetetur. Aliquip suscipit est.