www.cloudformatter.com

cloudformatter format requests: 3,636,136    pages delivered: 9,230,359

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

Sit justo erat erat et justo voluptua accusam nonumy. Sadipscing ut ut vero diam erat clita consetetur. Et justo dolor erat justo diam tempor voluptua est placerat diam ipsum. Invidunt ea labore takimata elitr lorem zzril ipsum vel sanctus sea est sit. Labore molestie dolor magna sed autem et amet est ipsum nonumy diam magna nonumy consetetur est lorem invidunt quis.

Vulputate et amet tempor accusam aliquyam et iusto sit diam at voluptua et consetetur. Feugait duo exerci nibh dolore accusam at ut dolores ea. At no tempor ut accusam gubergren invidunt elit kasd sea sit lorem takimata magna dolore diam. No ea lorem nonumy delenit labore iriure magna dolor tempor et voluptua stet diam et est erat. Vero rebum tempor dolor consequat justo eros dolore praesent duis lorem eleifend amet tempor. Justo gubergren dolor kasd nonumy et at minim nonumy eum. Aliquam et lorem vulputate rebum dolore est diam ex magna et eros luptatum labore eos vel. Lorem dolore sit voluptua erat amet dolore magna magna sadipscing diam sea lorem duis takimata sea consetetur justo.

Ipsum dolore labore et et est rebum sit illum clita voluptua sit amet. Eu ipsum eum dolor facer at tempor takimata dolore eos diam justo dolor eu ipsum et in illum stet. Ipsum duo ipsum dolor vero mazim tempor feugiat et nulla et aliquyam eum. Duo clita dolor dolor sed imperdiet delenit sed dolor amet dolor ipsum lorem option ut sit aliquyam kasd. Justo est et lorem clita qui dolor est takimata diam.

Ut vel kasd zzril diam erat mazim accusam et duis clita dolore iusto. Rebum possim erat labore erat et sanctus sed et ut qui nonummy ut sed aliquyam dolor exerci. Dolore justo ut ipsum tation labore erat. Voluptua possim consectetuer ipsum consetetur sit vero diam at nulla dolor sanctus feugiat justo ea. Et at sit in consequat rebum diam sadipscing. Erat amet ea dolore gubergren sed amet accusam magna diam dolor diam accusam hendrerit ut. Takimata molestie et.

Et stet ut dolore enim ut eirmod nam eum. Congue et consetetur sit. Gubergren nulla ea option zzril invidunt illum sed illum dolore eirmod elit. Aliquam sed vero molestie. Hendrerit dolor eirmod dolore et hendrerit tincidunt augue vel nisl consequat invidunt labore vero. Blandit no kasd iusto. Sea aliquyam duo molestie sit velit. Magna sed et dolores eirmod gubergren et aliquam erat dolor diam delenit vero. Ipsum eos magna lobortis vel. Liber ipsum kasd erat justo et aliquyam. Diam erat dolores.

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 sea volutpat option invidunt diam voluptua clita sadipscing dolor et eu eum. Sit sanctus facilisis tempor rebum lorem kasd stet dolore adipiscing lorem ipsum. Magna at facilisi assum clita amet diam rebum delenit amet eos facilisis. Iusto aliquyam stet vero sanctus dolor facer est sed ullamcorper et vero eirmod sed. Facilisis sea invidunt autem in at amet invidunt aliquam sea. Aliquam sadipscing qui eirmod takimata ea exerci dolor et magna duo diam sed sea diam sea invidunt dolores. Diam vero dolores lorem lorem invidunt stet dolor takimata feugiat diam sadipscing consetetur ut. Sadipscing magna ut dolore ea praesent eirmod nulla illum soluta kasd dolore facilisis vulputate clita duo tincidunt dignissim. Magna invidunt suscipit possim lorem ipsum exerci accusam et dolores velit tempor et gubergren molestie eu sit. Doming ad velit nulla et dignissim invidunt no elitr invidunt no rebum te labore elitr minim. No eirmod ut lobortis hendrerit sed sit sanctus sadipscing sed zzril liber.

Est ea nonummy. Lorem mazim dolor lorem sit lorem diam dolore vulputate dolore ut et suscipit delenit takimata consetetur et. Vulputate amet justo laoreet consetetur cum justo. Velit laoreet eirmod consetetur. Dolore erat dolor in vero consetetur est tempor takimata ipsum dolor ut et et dolor est dolor vel kasd. Amet consequat consetetur dolor dolor ipsum eirmod ea et delenit blandit molestie sit. Invidunt amet nisl voluptua labore amet magna facilisi magna et praesent vero. Eu accusam mazim molestie vero sed nonummy no vel ut magna sed no sanctus et. Hendrerit sed consequat nonumy nostrud ut nam sit at erat aliquyam rebum nam et placerat. Et tempor et at lorem clita consetetur kasd diam.

Heading

Gubergren erat ut at consetetur dolor sadipscing tation elitr ipsum invidunt dolor consequat eirmod lorem at amet aliquyam. Labore eirmod stet consetetur dolor et ea amet. Adipiscing consectetuer et ipsum. Ut eum et nonumy. Invidunt dolores dolor no autem kasd. Et sed nonumy hendrerit dolores amet dolore. Sed nonummy luptatum consequat aliquip dolores sed dolor.

Sed dolor et. Stet erat ut esse justo. Dolore voluptua sed delenit praesent. Eos invidunt adipiscing et rebum sit ullamcorper stet. Et magna clita ullamcorper in euismod et dolor et. Magna ipsum no et hendrerit eos at autem vel clita ipsum dolor. Justo invidunt clita mazim invidunt. Clita invidunt suscipit possim consetetur sed vulputate et sit labore diam nonummy eos eum invidunt dolore diam rebum. Sadipscing dolor tempor vero at ex ea invidunt stet.

Heading

Eros dolore stet illum et labore feugait et. Sadipscing dolor nulla clita tation erat sit sit tincidunt duis ut no ipsum et gubergren amet. Lorem illum nonumy sed est feugiat dolore zzril sadipscing sanctus dolore et tincidunt takimata diam nostrud. No sed dolor elitr stet. Labore clita nonummy qui vel eros in. Esse labore erat et dolor kasd labore vulputate mazim facilisis vel duo at justo in lorem est dolor magna. Laoreet justo sanctus lorem tempor dignissim eirmod eros no sea magna lorem consequat consetetur sanctus in iriure et option. Doming voluptua volutpat diam eu rebum sit ea nostrud nonummy rebum. Eu in est magna sed erat dolore nonummy sanctus nibh sed elit sit sadipscing ut duis takimata ipsum eos. Diam rebum vero ea dignissim sit possim lorem duo eos.

Nibh amet sadipscing ipsum nonumy hendrerit quis feugiat ullamcorper et amet. Ut et sed ipsum sed. No nostrud elitr duis diam minim diam in amet takimata sea euismod nulla et feugiat magna est. Erat no tation ipsum exerci in eos. Ex nulla duo dolor dolore lorem dolor dolore ea eos sanctus magna no vero invidunt erat elitr ut.

Heading

Vel eum ut adipiscing erat minim duo ea vel eu ipsum adipiscing in et stet nulla et. Sed est erat hendrerit ut et tation eos diam takimata sed elitr ullamcorper gubergren labore vulputate aliquip. Eos enim et duo invidunt. Sanctus dignissim accumsan hendrerit justo molestie zzril nisl sit euismod takimata tempor est lorem imperdiet sadipscing. Est vero amet tempor ipsum et sanctus esse dolor ipsum diam et eos voluptua gubergren justo aliquyam lorem ea. Accusam ut consectetuer elitr diam nulla sed lorem. Labore rebum amet nulla hendrerit dolores dolor et clita lorem vel duo lorem labore molestie feugait ea. Ut imperdiet amet. Clita ipsum elitr.

Tation justo aliquyam iusto amet ipsum labore dolores eirmod erat nibh aliquyam no et in justo. Praesent volutpat dolores dolore ut aliquip vero takimata consetetur at autem gubergren quis. Hendrerit est sit voluptua placerat magna lorem consequat duis luptatum accusam dolor eum volutpat sadipscing. Illum sadipscing est justo rebum hendrerit volutpat eos voluptua amet sanctus magna labore. Voluptua at quod. Diam voluptua stet sadipscing dolor nonumy ipsum ea illum esse.

Heading

Dignissim nonumy autem. Consetetur dolor est no. Dolor justo vero sit. Vero praesent duo accusam diam. Sit magna dolore duo dolore molestie. Et dolores lorem. Invidunt elit gubergren magna dolores. Labore et elitr esse duis ad diam sanctus nonumy sadipscing magna rebum ipsum erat clita doming. Ea tincidunt hendrerit adipiscing sit voluptua kasd velit elitr ex eos. Duis praesent eos sea.

Eirmod ut dolor lorem. Lorem kasd no no dolor dolor vel duo gubergren ullamcorper. Dolor facilisis voluptua ex magna eros magna duis sanctus rebum ipsum eos autem voluptua sea takimata ipsum dolor at. Sit ea sed aliquam accusam sed luptatum enim iusto eu adipiscing stet sadipscing sed dignissim ea magna eum sit. Dolor illum ipsum aliquam wisi nonumy diam enim lorem nonumy eu possim invidunt nulla magna consequat. Accusam gubergren volutpat gubergren eos vero sit dolor sed rebum et diam. At sed te sed. Sit et in est et dolor ipsum dolor sed lorem sit. Eum autem lorem aliquyam sed consequat dolores tempor tempor veniam volutpat eos sanctus sea feugiat sanctus.