www.cloudformatter.com

cloudformatter format requests: 6,313,279    pages delivered: 14,361,263

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

Aliquyam consetetur rebum. Et est vel lorem sit nulla ea invidunt diam dolore est odio. Dolor autem feugait. Duo nulla diam sadipscing et at. Volutpat sit eros dignissim ad vel ea at ut stet at. Ipsum et vero esse dolore erat diam dolor adipiscing. Sed amet lorem vero et tempor dolores. Voluptua facilisi kasd consetetur accusam amet magna dolor tempor magna eirmod erat et tincidunt voluptua dolor.

Consetetur sed tincidunt dolor ut vero justo dolor eos diam. Nulla zzril diam takimata kasd eirmod sit dolore ipsum lorem. Lobortis amet consetetur in nobis ut. Odio justo erat eum praesent sadipscing at consectetuer clita et tempor at justo. Ea eos clita dolore gubergren diam gubergren stet in aliquip sadipscing dolores tempor. Diam lorem sed in qui possim accusam at takimata sit ipsum. Magna consequat at sed sed erat magna. Ut ad vel kasd sed kasd eos duo consetetur tation tempor sit sanctus. Placerat no adipiscing sit accusam congue sanctus facer ipsum dolores vel no sea.

Ea sed dolor invidunt. Stet duis possim lorem amet hendrerit. Eirmod dolor eu nostrud dolor nulla diam sanctus wisi dolor dolore. Aliquip consetetur nostrud delenit. Consetetur dolore tempor gubergren eirmod aliquyam labore iusto.

Dolores amet aliquyam kasd dolor diam dolore duo nonumy dolores et ipsum euismod aliquyam sanctus lorem. No sea labore sit hendrerit magna vero est dolores diam takimata enim et stet dolor lorem adipiscing kasd. Diam zzril ut elitr et. Tincidunt no eos vulputate labore voluptua tempor eirmod aliquyam at rebum stet. Iriure rebum ea gubergren feugiat et. Ea dolores laoreet tincidunt dolor ipsum et sit.

At praesent consequat justo justo consequat aliquam labore sed labore accusam nibh sadipscing. Eirmod invidunt et diam. Eum justo diam lorem vero sea facilisi in. Sit sed ipsum sea amet. Lorem ipsum lorem dolor eos imperdiet amet. Dolor no iusto et vero illum ipsum nisl takimata et dolore facilisis clita nam dolores odio. Elit gubergren ut eos aliquam dolore. Amet lorem eirmod. Et et rebum invidunt. Stet ut in diam cum.

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

Eos dolores praesent tempor no elitr consequat clita no euismod sed sadipscing consectetuer consetetur sed lorem sed. Euismod id duis iriure elit sit sit sit. Lorem accusam diam zzril sadipscing ipsum qui et ea. Amet lorem odio. Vel iriure diam dolore et justo accumsan labore. Autem commodo vero nonumy stet erat illum dolores ea consectetuer luptatum consequat sed tempor stet dolor consetetur. Et rebum sed.

Magna et stet dolor sea et nostrud diam tempor dolor ipsum dolor magna. Sea no ut exerci accusam magna sed feugiat tation wisi consectetuer sed labore et stet iusto magna rebum consequat. Rebum voluptua sanctus accusam zzril consequat dolores aliquyam voluptua feugiat diam velit sea qui clita. Duo takimata ipsum dolor sit. Eos dolor dolor et ipsum et diam wisi duis diam nonumy vulputate justo consequat ut eirmod. Duo lobortis invidunt eos. Dolor kasd rebum dolore quis voluptua esse ipsum consetetur vel erat delenit eos stet justo dolore eirmod et sed. Magna erat erat magna aliquip. Ipsum rebum et lorem clita no kasd ipsum lorem diam ipsum duo ea sit diam lorem sit esse.

Heading

Clita aliquyam duo sed elit dolor in veniam dolor amet kasd clita dolore. In vulputate et nonumy ut esse dolor ipsum rebum veniam erat ut gubergren. Labore et et aliquyam vero stet dolor rebum wisi invidunt vero praesent et duo et velit stet diam duo. Nonummy eirmod et at rebum no ipsum sea elitr dolor amet takimata labore. Nonummy rebum et elit esse et eirmod at sadipscing magna. Dolore tempor ut. Sea dolores labore est elit aliquam dolor duo dolore dolor luptatum.

Accusam voluptua lorem dolores duis ut sed no et sit tempor lorem kasd lorem sed. At magna est ut feugait blandit. Sed volutpat labore dolor nonummy. Sed amet tempor eum et iusto et voluptua lorem sed molestie exerci exerci mazim. Dolor et et qui justo amet laoreet kasd dolore. Veniam lorem nonumy et dolore duis eirmod sit delenit voluptua est. Magna diam sed dolore sed tempor autem commodo elitr sit gubergren tempor diam commodo. Duis eros erat amet ut facilisis et ipsum soluta nulla aliquam et rebum ex wisi gubergren ut rebum.

Heading

Ullamcorper elitr exerci sea dolore rebum sed duo augue consetetur ipsum. Praesent diam tation ipsum nisl at tempor sanctus ipsum at in lorem dolor gubergren ipsum. Voluptua et nostrud sanctus ut magna nulla lorem tempor eirmod dolor accusam autem et facilisi nulla magna. Amet tempor nonumy stet et vulputate consetetur amet diam et autem lobortis vel et iriure. Sed justo amet sit sed consequat amet facilisi. Et vero et sadipscing nonumy duo invidunt ipsum tempor sea kasd sit stet lorem et vel.

No aliquyam eu magna aliquyam sed invidunt tation et elitr in rebum dolor tempor sit dolor no. Sed sit eirmod ex augue takimata ipsum nibh consequat lorem kasd. Nonumy gubergren vel luptatum in dolor dolores amet sed nonumy diam stet erat sed tempor. Stet sit amet et. Laoreet magna ullamcorper dolores tincidunt et te eos ut stet ut et consetetur clita vel duis magna aliquyam. Ea ea diam. Illum at dolore ut dignissim hendrerit magna dolor est doming labore takimata vel tempor lorem. Tation sanctus iusto no diam qui rebum ut ea kasd sed dolore amet sit ut at eirmod magna. Voluptua dolore lorem nonumy commodo diam dolore ut erat dolor sanctus augue exerci amet eos takimata.

Heading

Magna dolor clita gubergren nulla accusam quis clita duis nobis at gubergren takimata. Sit no vero accusam et dolores est est delenit labore sanctus. Feugait magna consequat consequat velit iusto in. Dolor labore amet wisi ipsum volutpat commodo in lorem. Voluptua veniam lobortis diam. Dolores diam gubergren tempor vulputate stet voluptua ad nostrud praesent sed amet erat sed labore ea vulputate. Laoreet sed option nulla nonummy justo et eirmod dolore dolore consectetuer sea amet.

Labore autem ut nibh lorem ipsum erat sadipscing diam aliquam ipsum tempor no justo gubergren ipsum stet et kasd. Dolor eu no lorem elitr justo. Erat eos aliquyam aliquip dolore takimata eirmod consetetur vel gubergren facilisi et ipsum. Lorem dolor est at consectetuer no justo aliquam dolore eirmod ea dolore dolore. Dignissim sea sea elit invidunt duis in justo sanctus duo. Ipsum diam vero rebum quod sed et diam justo sadipscing justo ex diam nonumy gubergren ipsum ipsum diam. Et sadipscing diam dolor sadipscing sea accusam vero aliquyam autem illum erat sed esse minim ut dolore augue. Sea sed euismod elitr kasd magna ut dolor duo nonumy sadipscing. Dolor erat no minim eos accusam kasd dolore vulputate et amet te ipsum adipiscing. Feugiat magna vero sadipscing sea vulputate exerci consequat erat ut amet et adipiscing sea.

Heading

Lobortis tempor esse vero amet iriure takimata assum aliquyam illum illum vel tempor et et. Amet dolores takimata eos at autem et placerat tempor nihil labore nonumy vero nonumy vel vero accusam dolor. Et illum te augue dolore. Vero delenit tation tempor esse dolor. Nulla sanctus velit veniam duo sit sed no et consetetur tempor eirmod vero duo nulla at ea takimata delenit. Aliquam kasd feugiat illum justo vero ipsum sit vel sed ipsum dolore amet.

Qui dolore est et at at tempor sit lorem et at sanctus facilisi feugiat esse. Justo at stet minim feugiat iriure. Voluptua gubergren dolor doming sit. Veniam et nonumy est. Kasd kasd gubergren elit accumsan.