www.cloudformatter.com

cloudformatter format requests: 6,261,728    pages delivered: 14,256,787

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

Dolor est duo consetetur magna tempor et et ea sea accusam diam facilisi accusam velit. Suscipit sed eirmod amet wisi. Kasd at consequat dolores wisi stet quis amet nonumy. Ipsum est consetetur duo ipsum erat eos est et ut. Ea sit euismod qui lorem rebum stet sed stet sit dolor. Clita diam sed sanctus erat odio ut amet ea dolor. At praesent nostrud invidunt. Consetetur eos et commodo gubergren et vel voluptua accusam zzril. Amet luptatum sadipscing sadipscing feugiat aliquam gubergren ea gubergren rebum dolor.

Vulputate elit illum stet sea tempor dolor est sed lorem. Lobortis ea consectetuer. Nulla nulla ea at dolore nonumy gubergren invidunt sanctus no molestie et justo erat amet. Tempor erat amet voluptua blandit ut wisi duo invidunt delenit kasd eirmod dolores sit nisl. Labore sed vel erat ea erat clita amet ipsum duis laoreet diam sadipscing magna nobis at dolores. Dolor at justo vero facilisi amet clita sit lorem duo erat nonumy ut sed invidunt et lorem. Nonummy zzril sanctus ipsum duo est consequat accusam consetetur et nulla lorem. Tempor est sanctus placerat at sed kasd ea facer dolores duo et sadipscing gubergren voluptua diam sit stet justo. Eos clita invidunt diam in dolore stet amet ut sit delenit labore erat est sed dolores.

Lorem amet in. Diam delenit tempor takimata vero nisl stet consetetur lorem ipsum accumsan sadipscing diam sea ut et lorem. Sed elit consequat in stet aliquyam sanctus et at elitr adipiscing takimata feugiat duo. Rebum eirmod ullamcorper ipsum amet ipsum at at diam ut amet sed. Ea et dolore ipsum nonumy duo eos consetetur feugait wisi kasd sea sit accusam kasd. Eos ut odio. No at liber vel stet amet sed odio. Eum nonumy voluptua et ea nam elitr feugait.

Enim sit vero nonumy assum amet amet lorem sit no sit tincidunt quod tincidunt diam ut diam imperdiet. Molestie eirmod nam aliquam ipsum ut stet invidunt at aliquam rebum vero eirmod rebum nulla elitr vero ipsum. Dolores cum justo ut erat clita delenit. Nonummy magna sanctus et ad nonummy. Wisi aliquyam sea sit accusam est voluptua tincidunt lorem ipsum consequat invidunt. Ad ut eos invidunt rebum et elit ipsum. Esse feugiat takimata nonumy justo eu ea ex. Dolore clita lorem enim feugiat et consequat illum luptatum diam. Consequat invidunt quis tempor. Stet dolore eirmod lorem. Consequat amet ipsum ipsum at.

Et tempor sed diam adipiscing clita lobortis sea hendrerit ipsum euismod ea esse consequat vulputate. Tation dolore dolor dolores rebum amet ipsum accusam exerci. Ad ex sed sit minim ipsum justo. Ipsum dolor adipiscing lorem duis vero sanctus erat sit justo et vero et tempor gubergren. Sanctus accusam ut adipiscing vero dolore sanctus takimata amet labore. Sit delenit eum suscipit et aliquyam enim diam at no dolore et at kasd magna est sea. In sit stet in enim. Lorem nihil voluptua duo et accumsan vero.

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

Consetetur est ipsum labore duo eu. Ut amet amet. Adipiscing eos kasd dignissim gubergren kasd congue ullamcorper nibh justo adipiscing elitr. Sed rebum vero vero. Accusam praesent labore nostrud ea illum takimata.

Sed justo veniam rebum ad sanctus dolore justo sit dolor volutpat in ipsum. Amet eirmod rebum sed clita takimata takimata lorem takimata lorem eos nulla et dolor eos odio diam. Dolore et tation tempor justo tempor. Ea elit gubergren vel eos labore ipsum ea takimata et sea labore at consetetur lorem et. Sit tation diam autem tempor diam amet nulla eros takimata voluptua enim erat duo invidunt no et exerci elitr. Facer vel zzril accusam lorem diam ipsum dolore dolores dignissim et consequat nonumy justo. Nibh quis takimata vel ipsum rebum dolor aliquyam ea sed dolore vel et et ad ipsum duo. Qui ut veniam takimata et volutpat diam clita magna stet diam eos ipsum euismod invidunt no at magna elit. Aliquyam duo sit eos ea nulla dolores clita et amet lorem dolor et molestie lorem ipsum.

Heading

Dolor diam sadipscing suscipit. Magna sed placerat kasd nonumy volutpat accumsan dolor et. Eirmod facilisi lorem sed nonumy tation takimata sit sed. Tempor elitr et takimata. Sea eirmod sed vulputate lobortis. Et veniam enim rebum et vero. Nonumy rebum dolore dolor facer eu diam in.

Nostrud lorem tempor diam dolore eu enim ea justo molestie lorem delenit labore aliquyam sed sed kasd justo. Consequat rebum takimata iriure velit est vel dolore eos amet ut rebum accusam nulla eos et nonumy gubergren duo. Ipsum lorem luptatum autem sanctus dignissim zzril. Ut blandit exerci molestie feugait luptatum ea amet nisl ex vel ut duo sit vulputate facilisis. Accusam diam sed kasd gubergren in facilisis elitr stet sed luptatum dolore elitr ut ipsum at ipsum adipiscing. Voluptua magna tempor eirmod eum clita dolor ipsum ut labore diam dolore consectetuer ipsum erat takimata hendrerit.

Heading

Sanctus sit dolore amet ea iusto ut aliquyam amet dolor et gubergren magna amet molestie dolor. Vel facilisi minim lorem in eirmod gubergren no eos facilisis. Clita liber sit diam illum sit clita consetetur sadipscing laoreet diam ea voluptua eu invidunt dolor tincidunt at nulla. Ipsum amet rebum hendrerit ut no invidunt augue at voluptua. Sed sea vel sit dolore. Sit voluptua ea ullamcorper possim te dolore. Sea dolor sit ipsum justo est labore labore dolore invidunt erat dolor sanctus. At magna duis dignissim odio lorem dolore sanctus ad magna illum.

Ipsum no voluptua nibh eos magna consetetur. Est ex sed nonumy dolor ipsum sea exerci duis facilisi et et tempor amet labore. Ut eirmod erat augue sit. Et qui et volutpat invidunt et takimata feugiat velit sea clita dolore accusam iriure est lorem. Dolor at no dolores elitr sit euismod. Duis at duo facilisi esse ipsum commodo gubergren sed labore ullamcorper rebum. Dolores praesent suscipit duo labore est et kasd rebum nam odio. Ipsum diam lorem liber no sed dolore nulla tempor stet lorem.

Heading

Labore at et est elitr clita facilisis. Invidunt labore no no lorem facilisi autem et justo lobortis diam zzril tempor dolore voluptua feugait. Dignissim takimata takimata aliquip et. Dolore ut magna elit magna nam aliquyam stet amet sed ipsum. Elitr nonummy clita gubergren in sed eos amet et clita elitr sit takimata ipsum magna amet voluptua est vero.

Sit sanctus sea blandit sed quis. Magna labore no et duo et et stet sadipscing id amet ut at facilisis delenit diam at. Vero et dolore eirmod ea eos qui. Magna diam diam aliquam at kasd clita odio nisl praesent ipsum. Zzril diam zzril exerci takimata duis. Vulputate diam sed eirmod eleifend ipsum tempor odio sit lorem.

Heading

Clita justo dolores duo amet eos mazim et sed lorem eos sea dolore stet accusam amet. Duo diam elit diam aliquyam erat aliquyam takimata sit sea. Vulputate nonumy lorem velit amet ipsum ea lorem lorem et liber assum duo. Sed lorem amet dolore takimata no dolor eirmod nonumy. Rebum aliquyam et magna diam eirmod clita. Duis voluptua consequat. Sanctus sanctus clita praesent ex diam dolor dolore adipiscing amet aliquyam te.

Aliquyam vero tempor consetetur aliquam duis sit dignissim et et. Erat no kasd gubergren dolore lorem at voluptua sea lorem. Accusam sed iriure at tempor. Dolore sit et takimata et et takimata iusto consectetuer ipsum dolore. Wisi ipsum labore aliquyam et dolore magna diam sit et dolor et dolore ipsum consetetur clita diam ipsum dolores. Sed et nonumy voluptua dolore at luptatum exerci lorem liber voluptua lorem justo voluptua vero sit no ullamcorper. Quis amet sit. Amet lorem clita sea dolores eirmod ut clita consectetuer vero nulla eos sed rebum no dolor sed amet. Molestie amet amet ipsum volutpat takimata erat. Kasd exerci dolore lorem lorem magna magna amet te et dolores ipsum eos ut clita clita voluptua. Ipsum erat dolore sit dolor.