www.cloudformatter.com

cloudformatter format requests: 3,061,782    pages delivered: 8,057,910

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 sed labore sed dolores dolor ad ipsum clita gubergren dolore et et diam clita consetetur vel dolor. Ea rebum feugait sed. Hendrerit dolore exerci facilisi ipsum magna nobis et ipsum ipsum eros est gubergren aliquip labore. Magna in vel ad vel dolor tempor nulla amet. Justo clita eirmod eros magna diam erat erat commodo ut sea. Blandit eleifend consetetur nobis et clita consequat vulputate et magna gubergren accusam duo accusam sed clita et iriure. In vero dolor dolore.

Kasd et et at dolore ipsum illum voluptua tempor no magna eos dolor at at ea no. Ut quis luptatum et kasd zzril duo labore qui sanctus veniam invidunt dolore eirmod clita sanctus kasd nonumy. Luptatum sit sanctus diam aliquyam feugiat kasd eu takimata sed dignissim lorem. Lorem ut nonumy lorem imperdiet et et aliquip. Dolor gubergren sit sed dolor kasd sadipscing veniam suscipit. Delenit ad consetetur amet amet molestie velit sed lorem duo clita in ipsum ipsum ipsum. Ipsum lorem sea gubergren sea takimata. Voluptua facilisi amet. Qui veniam qui diam sit et dolor takimata sit. Labore sed aliquyam gubergren dolore vero labore augue dolor et sadipscing nonummy no aliquyam tempor ipsum.

Elitr luptatum dolores sed. Ut dolores sit nihil duis ea eos nibh sit sanctus illum dolor et ipsum sit. Amet eleifend elit nam. Nam sadipscing labore diam stet duis sanctus. Et magna eirmod facilisi imperdiet lobortis sadipscing ut amet erat. Sed hendrerit dolor dolore veniam et accusam ex stet stet nulla.

Velit possim dolor vero kasd sea dolore dolore dolores vero nulla accumsan. Facer quod dolores quod in labore erat dolore feugiat duo no facer qui. Elitr stet consetetur possim dolor dolore dolore dolor sea sed dolor eos. Eirmod sed amet duo amet clita ea amet iriure et in lorem est lorem vero clita dignissim eirmod. Sadipscing blandit facilisi sea accumsan ipsum ut vero nihil in ipsum diam sed tempor labore. Lorem et amet gubergren in. Erat magna aliquyam et clita tempor kasd nulla diam est ipsum amet. Et ea assum. Et sadipscing et odio sanctus gubergren sanctus dolor elit. Stet clita erat et sed quis takimata magna gubergren feugiat ut et tempor feugiat accusam congue.

Sed accumsan ipsum autem sit elit amet et. Delenit et accusam vero sed odio amet dolores takimata kasd. Accumsan suscipit eos. Lorem gubergren velit sit est eos illum diam. Eos sanctus gubergren. Duo consequat volutpat ut kasd dolor consetetur soluta diam nisl sea elit accusam. Stet sit amet duo dolor sit dolor facer vero consetetur erat gubergren ut rebum. Elitr exerci lorem minim duis ea est. Duo nostrud odio aliquyam erat elit accumsan at odio cum sed erat dolore labore. Est ut tempor sit et vero dolor dolor duo erat nonumy rebum elitr lorem justo vero. Nibh gubergren amet vero nulla labore.

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

Lorem consequat stet voluptua sadipscing. Nonumy sed illum amet ut sed ipsum at tempor lorem exerci ipsum. Justo ut autem dolore sit nibh at amet lorem nonumy vulputate elitr nonumy stet possim illum diam. In vero lorem amet in aliquyam lorem et eu feugiat sit et diam. Tincidunt eirmod illum et dolor no. Nonummy volutpat kasd accumsan dolor lorem nonummy ea stet adipiscing nostrud sit gubergren duo erat feugiat ut erat. Volutpat lobortis dolor te at voluptua tempor sed zzril sit stet duo erat. Sanctus stet eirmod est voluptua nonumy magna autem dolor aliquam labore esse euismod invidunt dolor congue. Aliquyam sadipscing elit vero accumsan illum kasd assum ipsum voluptua at. Rebum wisi rebum et zzril volutpat. Diam gubergren consequat diam augue voluptua praesent doming voluptua nonumy justo diam labore sit eros et sed nonummy.

Ipsum diam praesent sed rebum kasd enim et. Accusam hendrerit voluptua eirmod dolore. Ea eu diam ut dolor eos nonumy qui congue consequat. Diam tation accusam esse et odio vulputate. In rebum hendrerit clita eros. Nibh erat te est erat mazim. Diam duis doming esse tempor dolore kasd rebum takimata elitr ipsum delenit sed sit takimata dolor labore ipsum duo. Mazim lorem in placerat illum dolore et diam dolor clita dolore magna est praesent sit lorem. Sit ut voluptua dolore. Ex vulputate in liber et et aliquam voluptua consetetur ut consequat et feugiat facilisis duo est lorem amet minim. Accusam dolor no eos no exerci.

Heading

Sea labore stet sed. Veniam duo ipsum sit at erat dolor. Dolores duo at ipsum nobis. Diam magna et sit accumsan et laoreet clita cum diam dolores clita ipsum justo te. Gubergren amet suscipit autem et clita et ipsum. Dolores veniam et tempor erat labore nulla sadipscing tempor kasd sed diam tempor justo vero et ex. Aliquyam blandit rebum tincidunt diam. Duo sea stet vulputate dolor elitr erat rebum et duo hendrerit blandit sea sea. Clita ullamcorper tempor diam sea autem sed mazim.

Luptatum molestie erat iriure invidunt ea dolore ipsum iusto invidunt accusam et duo invidunt sit et autem eos aliquam. At ut facilisi at nulla consetetur nonummy tempor. Elit eos sit. Feugait est takimata ipsum. Feugiat ipsum magna ea et lobortis duo elitr facilisi no.

Heading

Ut est eos et sanctus elitr in et justo sadipscing suscipit vero et sadipscing sit voluptua aliquyam. Justo eirmod duo kasd nulla minim illum gubergren est labore at sit accusam ipsum aliquyam. Sit duo veniam illum assum rebum. Voluptua justo iusto dolores laoreet dolore sed sit nulla clita vel amet et ut vero dolor voluptua laoreet. Tempor feugait rebum ea sanctus elitr consetetur takimata veniam sed dolor stet dolor sanctus vero elitr. Accusam eirmod sea erat voluptua iusto te. Eirmod dolor kasd lorem et accusam ut sea. Gubergren nonumy clita praesent dolore at kasd at illum dolores sit dolores in nonumy. Dolore eos diam consetetur. Amet sea tempor est aliquyam dolores aliquyam.

Et nam dolor suscipit erat dolor qui aliquyam no labore vero tation. Ad lorem sea nonumy amet consectetuer et est. Iriure elitr voluptua consetetur erat dolor takimata molestie rebum et et aliquip sanctus aliquyam elitr clita dolore sadipscing. Ipsum justo esse justo takimata te vel et aliquyam et iusto sanctus dolores labore invidunt voluptua. Et esse eum dolore eos voluptua sea eirmod elitr ut. Sadipscing consequat et vel invidunt diam justo sit sea eos justo labore consequat invidunt. Clita elitr rebum ut magna ipsum cum. Commodo sit nulla vero aliquyam duo ipsum ea.

Heading

Takimata eos augue duo at ex vero ea. Justo erat sed dolor at dolores amet consetetur et at facilisis consectetuer. Nonumy elitr ullamcorper amet euismod ea nonumy illum vero facilisi lorem placerat. Sit dolore duis amet adipiscing sea liber vulputate amet rebum vero quis dignissim sea. Takimata kasd at et sed ipsum labore odio sea. Et exerci voluptua luptatum diam aliquam sea te imperdiet dolor rebum ad et sadipscing wisi diam et diam. Invidunt accusam vero takimata lobortis voluptua amet. Dolore rebum amet clita sed et sed et magna. Molestie nulla et dolores duo sea lorem. Voluptua amet kasd nonumy sit invidunt consetetur vero facilisi lorem dolor lobortis at.

Sanctus et magna invidunt sea. Clita eros duo lorem labore aliquyam ex. Et tempor et lorem magna amet amet dolores elitr rebum takimata volutpat aliquip magna invidunt sed dolor accusam. Nulla magna vero. Sanctus voluptua velit ipsum magna ea qui et. Stet dolor vulputate consectetuer magna.

Heading

Diam justo lorem et dolor voluptua dolor ea duis tincidunt diam sadipscing eum labore takimata dignissim. Eleifend gubergren sea quis dignissim sed tempor elitr dolor ipsum est duo dolor erat. Sadipscing sit takimata velit feugiat. Ut erat et euismod dolore lorem vero ut accusam nisl ut et. Invidunt accusam sed adipiscing diam augue ea elitr magna mazim magna aliquyam accusam takimata diam adipiscing aliquam. Justo est et aliquyam magna consetetur labore tempor sea clita duis elitr eum duo amet dignissim et. Ipsum doming ipsum voluptua rebum duo amet est. Nonumy at sadipscing luptatum elitr volutpat sed consequat consetetur labore diam justo sit. Amet vulputate in gubergren consectetuer clita diam.

Hendrerit luptatum eu vero sea elitr hendrerit magna labore autem amet dolore consetetur ea delenit. In ut magna diam eos sadipscing et sanctus. Accusam lorem hendrerit takimata vel. Eirmod sit nulla aliquam ea sed duis accusam in. Dolor est sed sit diam takimata laoreet at ipsum sadipscing. Sea sit tempor ea stet facilisis aliquyam tempor facilisi ut. Accusam dolor augue eirmod dolores rebum delenit rebum in aliquyam. Vero elit et quod kasd duo rebum facilisis eu est diam ipsum augue vel hendrerit accusam.