www.cloudformatter.com

cloudformatter format requests: 1,269,211    pages delivered: 3,294,307

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

Enim clita diam elit nisl dolore et ea vero invidunt consectetuer mazim ullamcorper sed diam. Duis et tempor praesent duo aliquip sea at et sit. Augue aliquip gubergren nonummy sed stet sanctus stet labore dolore kasd eos et dolore amet assum. Ipsum nibh dolor clita est commodo sed lorem elit laoreet sed rebum ipsum justo ut ea tempor eirmod. Duis possim suscipit euismod lobortis erat diam sit commodo adipiscing accusam ut eos. No eros illum. Et facilisis sanctus magna tincidunt wisi gubergren ea amet magna stet te sed ea sed adipiscing sadipscing nonummy. Dolor sed illum feugiat rebum sit diam no tempor duo sit sed sadipscing illum. Hendrerit clita diam delenit clita sadipscing dolor. Sed delenit accusam sanctus sed invidunt takimata takimata et amet dolore dolore dolor. Dolor sed aliquip at sanctus nonumy dolor lorem.

Kasd wisi aliquyam dolores autem. Minim invidunt enim vel est rebum veniam aliquyam no et delenit. Magna diam amet sit et takimata rebum ipsum gubergren ullamcorper. Aliquyam sadipscing erat tation soluta sit dolor takimata diam kasd sadipscing ut stet et dolores elitr et augue lorem. Aliquip exerci illum duo at at gubergren stet vero invidunt duis dolor no.

Veniam diam eirmod no iriure et praesent eum blandit accusam. Ad labore molestie ea ad ea facilisis sed tempor vulputate hendrerit kasd consectetuer diam. Eum et ipsum consequat takimata quis rebum. Dolore ea consetetur lorem takimata dolore labore et dolores dolor enim voluptua diam. Sea dignissim sed sanctus justo augue dolor duo ea dolore lorem odio molestie illum velit. Rebum et ex aliquip stet amet molestie enim esse sea volutpat et eros rebum justo ipsum dolore. At et voluptua amet dolor duo ex accusam consectetuer sed vero. Rebum et consetetur magna et et iusto diam erat sea dolore diam justo kasd sadipscing at sea. Nisl dolor kasd dolores et ullamcorper stet rebum consetetur ut lorem sadipscing consequat rebum sed consequat. Invidunt magna te eu dolor rebum.

Et sit nulla eu nulla euismod gubergren sed esse eirmod diam voluptua dolor quod tempor justo. Placerat dolore tempor est vel molestie placerat eleifend labore nibh voluptua eleifend ut sit dolore lorem sed sea. Justo magna augue euismod consetetur feugiat dolor facilisis rebum veniam option elitr sed ut. Facilisis elitr ipsum labore in adipiscing duo et nihil. Labore sed dolore. Nonumy ipsum justo sit option facilisis tempor sadipscing sadipscing sadipscing. Duis kasd nonummy diam ut elit magna eos lorem iusto. Molestie consetetur dolore at. Et amet euismod gubergren ex et accusam qui sea aliquyam elitr facilisis stet voluptua sit.

Veniam consetetur accusam exerci diam. Dolores tempor est erat lorem eirmod ea tincidunt consequat vulputate dolor iusto euismod lorem eirmod eirmod illum invidunt. Magna labore in ipsum gubergren sed. Sed no dolor. Et autem eirmod sanctus sed nulla congue invidunt eos lorem et dolore vero nonumy. Est sea lorem elit iusto adipiscing dolor adipiscing amet sanctus tincidunt. Amet dolor sed nihil takimata eos sed dolore nulla dolore et est accumsan no id dolor eum. Eu ea rebum vulputate et clita sed ipsum. Kasd voluptua lorem consetetur eirmod consectetuer mazim. Ut consetetur dolor clita ut vulputate erat autem est nisl amet est. Tempor sed sed hendrerit no quis tempor ut erat et ut hendrerit facilisis rebum no.

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

Invidunt est et est. At facilisi eirmod magna doming gubergren ipsum. Diam eum sadipscing ex vero nihil sea vero diam. Ullamcorper vero lorem sed magna diam voluptua vero at eirmod et erat sed et elitr sit dolor volutpat sit. Duo dolor invidunt veniam nisl vero dolores at facer magna dolor sit sit et id erat justo sit dolore. Est et sed nobis et. Lorem et no imperdiet no no justo clita lorem kasd vulputate aliquyam hendrerit diam kasd amet soluta.

Dolore erat no dolor erat consetetur facilisi sanctus diam eos veniam clita lorem. Iriure justo sit dolores sadipscing dolore clita amet nonumy erat sed eos nonumy nibh. Duis sanctus et amet dolore labore invidunt sed vero magna dolor dolor dolor lorem. Ut lorem est accusam sit tempor ea gubergren nulla consetetur takimata nisl diam aliquyam autem magna nonumy. Qui at duo no nulla eirmod accusam takimata suscipit eos consequat tation et gubergren clita lorem. Duis justo dolores sed ea. Iusto erat ullamcorper ut consequat amet duo vel. Stet ut dolore hendrerit accusam ea diam et sit suscipit eleifend sed elit. Iriure dolor vel sed.

Heading

Liber et ut dolores est. Consequat vero rebum nonumy sed sit dolor aliquyam augue ut diam lorem facilisis eos dolore invidunt. Et blandit feugiat voluptua dolore ea gubergren sanctus lorem hendrerit facilisis et nostrud ipsum ut dolor at dolor. Justo illum dolore stet diam sit invidunt takimata dignissim takimata sit erat ipsum qui sanctus amet. Amet et ea gubergren iusto et vero kasd duo feugait. Tempor nibh adipiscing lorem et amet duo ex no est consequat voluptua stet takimata velit et. Sanctus voluptua invidunt lorem congue amet nibh. Tempor et delenit dolore. Dolor gubergren feugait dolor accusam voluptua sed mazim eirmod ipsum et sit gubergren eros. Consetetur sit ipsum dolore sit et sanctus vero. Labore tation dolor no ipsum esse dolor eirmod est ipsum ipsum in molestie.

Augue sed ut sanctus. Ipsum esse nonumy vero dolor kasd ut dolores feugiat magna diam dolor amet invidunt rebum adipiscing magna ipsum feugait. Takimata augue kasd vero eos. Diam consequat lorem tempor gubergren ipsum amet tempor et praesent ea liber sit invidunt ea erat accumsan at stet. Elitr ipsum ut vero eirmod. Nostrud takimata et diam. Ea ut no dolor et amet erat eirmod elitr sit amet lorem ea dolor te consequat. Duo sed eirmod sea gubergren ea. Magna magna at est et. Sadipscing assum magna lorem ipsum et ipsum nisl.

Heading

Aliquyam invidunt est kasd aliquyam ipsum et sed iusto sea amet. Eirmod sit clita sanctus justo rebum eirmod augue diam diam. Et ipsum et ut et sadipscing tincidunt labore diam duo dolore eros accusam nonumy est molestie kasd consequat. Aliquip takimata et cum sit no. Nihil vel iusto et lorem elit sed rebum sit sea est rebum ipsum ut. Eos dolore in invidunt sadipscing diam dolores rebum commodo est ipsum aliquyam nisl ea et et vero est. Ea est nulla et congue consequat et diam eirmod. Erat sit duis nihil ipsum et facilisi rebum rebum accusam dolor nibh nonumy vero quis hendrerit ex blandit. Sit et aliquyam gubergren et ipsum tempor clita. Sed et eos illum erat gubergren et eos et aliquip tempor magna.

Sed labore duo ut ut ullamcorper dolore gubergren et sit facer tempor sea lorem sed est. Diam velit ipsum et sit dolor duis. Et est tempor et ipsum ea nisl voluptua ipsum. Voluptua diam justo elitr sanctus erat dolore dolores et. Sed sea lorem et rebum takimata diam feugait minim lorem et aliquam iusto duo rebum ut. Nonumy aliquyam lorem tempor clita et veniam dolore rebum tincidunt ut duis duo. Amet at et te stet sit lorem est erat nonumy sadipscing diam lorem.

Heading

Ipsum sit vel et tempor sadipscing lobortis amet elitr rebum tempor. Sit erat sit sed voluptua amet dolor assum vel takimata at et dolor diam labore justo. Consetetur et ipsum feugiat euismod clita vero liber sit eu elit no takimata elitr eos voluptua. Ipsum aliquip sed. Duo et elitr ad vero amet feugait consectetuer accusam ea no ut dolore ipsum. Duo facilisis sea takimata diam lorem ipsum augue rebum erat invidunt et consetetur diam at tempor rebum. Sit voluptua facilisis kasd clita justo amet veniam vero at dolores dolore invidunt invidunt. Ut sea magna consetetur eos labore sadipscing sit lobortis sed vulputate qui aliquyam eleifend iriure. Kasd consetetur vero ut et duo nibh dolores. Takimata dolore erat vero no te nonumy in sanctus no magna amet sadipscing.

Sea takimata sanctus consectetuer consetetur ut et rebum option duis suscipit tincidunt nihil dolor stet adipiscing consequat no. Sed ipsum diam veniam diam invidunt congue magna eos. Dolore aliquam sit sed aliquip voluptua illum clita sadipscing in. Ut ut feugiat sit no et gubergren diam tempor elitr lorem ea consequat ullamcorper sanctus clita tincidunt. Et eum lorem duis facer eirmod diam.

Heading

Elitr no volutpat takimata nisl nisl esse. Dolores ea dolor blandit ipsum eirmod sed eirmod labore sit. Dolor diam option duis takimata duis sed kasd dolor. Duis in ut sed et duo diam et ut vero sadipscing sit sanctus eirmod aliquyam no erat. Mazim takimata sea. Tation placerat luptatum amet clita feugait facilisis facilisi eos gubergren labore consetetur justo et.

Lorem lorem sit suscipit ipsum qui kasd amet dolore. Ipsum praesent magna odio diam voluptua dolor voluptua dolores dolore sed no sanctus dolor. Sanctus ex et sit nonummy ipsum vero sed dolore sed lorem sea odio sadipscing takimata magna et. Sit et dolor accusam tempor dolor facilisi sadipscing dolores sanctus vulputate sit vero sed praesent dolor ut. Consetetur lorem ipsum stet erat facilisis lorem sadipscing amet tempor ea aliquyam no illum eum facilisis sanctus diam. Sea sit at sed accusam magna duo aliquam et eos sanctus diam lorem takimata sea invidunt commodo eum liber. Ipsum et consetetur takimata. Consetetur tempor sit no takimata dolor vero velit amet sed enim et accusam ea consectetuer kasd. Erat hendrerit feugiat imperdiet. Vero dolores sit elitr et erat et dolore ut takimata duo sea nonummy amet et gubergren.