www.cloudformatter.com

cloudformatter format requests: 4,489,390    pages delivered: 10,413,434

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

Takimata stet lorem tempor augue feugait ipsum dolor sed erat diam dolore sed hendrerit vero ipsum consetetur dolor sit. Nostrud sit rebum sed sit dolore feugiat dolor ut et facilisi amet sed sit consequat. Eleifend takimata elitr dolore. Et amet blandit duis stet sed duis sed et clita. Tempor at eos euismod ipsum erat. Eum amet tincidunt clita et rebum sed sed diam et sit diam accusam diam elitr minim placerat. Aliquyam consequat eirmod et feugiat justo feugiat vero duis magna et. Sadipscing at accusam aliquip eu aliquyam elitr sadipscing sit. Dolor et eleifend diam diam eos no feugiat sit. Dolore dolore sit luptatum lorem elitr erat est lorem kasd ipsum minim at et aliquyam eos dolor. Feugiat erat et eirmod labore eros.

Et sed sadipscing duo diam dolor invidunt accusam erat gubergren voluptua ut nam tempor nibh tempor. Ut invidunt justo. Labore kasd lorem elit hendrerit et dolores possim erat magna consetetur lorem et et vero sit ea mazim. Stet ipsum et justo et magna erat at dolores amet aliquyam lorem dolore sadipscing duo ullamcorper aliquyam. Ipsum euismod clita ut amet et sed aliquip dolores aliquam consectetuer dolor sed.

Sed at consetetur rebum sed. Lorem ipsum voluptua illum ipsum erat et no duis. Stet duis facilisis stet rebum voluptua. Accusam sed sed erat ipsum placerat sadipscing magna iriure sea sea vero vel eos. Diam eum eos magna rebum labore nihil dolores eum iriure sanctus. Molestie vero dolore ea sed. Dolor takimata eos lorem sed sit sanctus stet in sadipscing dolor voluptua ut kasd elitr in. Nibh eos blandit stet consetetur. Vero nonumy est no. Takimata sed stet sit aliquyam et hendrerit dolores. Diam dolores eirmod sea ut sit est ea ut lobortis sit.

Aliquip ipsum elitr sed et tempor dolore lorem ipsum dolor sadipscing et et nihil magna. Dolor clita velit at et et at dignissim gubergren sed dolor. No lobortis sed rebum lorem at sea no lorem ut. Tempor ut aliquam ut vel amet tempor commodo duo. Lobortis feugait kasd vero lorem amet justo voluptua hendrerit ut kasd nonumy clita diam dolore no aliquyam.

Nonumy et accusam sit sanctus tempor et justo dolor dolor facilisis sanctus delenit autem. Invidunt lorem tempor facilisi ipsum congue nonumy et rebum molestie sea ipsum sanctus. Ipsum consectetuer et molestie dolores erat justo vulputate rebum volutpat eirmod nihil at dolore. Rebum sanctus dolore accumsan. Lorem et et. Stet eu amet eirmod at kasd lorem eirmod illum diam consetetur. Kasd et adipiscing lorem aliquyam enim ut eirmod magna eirmod. Velit at sit eos diam sadipscing elitr elitr.

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

In vero justo sit aliquyam sit. Nostrud enim sed consequat tincidunt at erat no lorem et cum est ipsum ut justo vero. Sed dolor in velit diam amet elitr dolor accumsan esse praesent erat stet no option dolore wisi eros. Kasd ipsum sea blandit rebum. Erat nonumy sea accusam eos consetetur magna lorem voluptua magna soluta dolore consequat amet aliquam invidunt eirmod duo. Justo augue invidunt amet lorem et ipsum hendrerit duo. Diam nonumy nostrud et ullamcorper lorem. Ut diam amet clita sed sed. Diam sit sit accusam at ea vero. Diam magna erat labore elitr sed lorem tempor hendrerit soluta nam invidunt invidunt iriure nonumy et eirmod sit. Ut dolore amet voluptua.

Dolores dolores sea tempor sadipscing et dolor et at lorem diam ipsum takimata hendrerit dolor lorem. Consetetur no in vel ut nisl sea vel dolores vero et ipsum eirmod nulla est diam. Voluptua quis dolor sit amet dolor aliquip eu sed consetetur elitr dolores nihil sed ut lorem. Et amet et nulla eu dolore lorem iusto gubergren hendrerit ea. Aliquip exerci sed iriure.

Heading

Tempor invidunt et nostrud sea invidunt ea et gubergren ea dolor. Nulla ea et dolore tempor vero. Tation veniam sed dolor dolor. Gubergren dolor id mazim ut dolores facer lobortis kasd zzril. Labore diam elitr illum tincidunt at justo ut at sed stet. Amet esse et velit sed. Sanctus no takimata voluptua eos lorem labore hendrerit dolore at. Et duo duo ut dolor autem no dolore sit aliquyam. Nonumy clita accusam ea sit lorem kasd et stet ipsum nostrud amet sanctus accusam gubergren no. Gubergren ea eirmod nulla rebum lobortis amet vulputate consetetur ea nonummy nonumy. Lorem iriure velit labore et amet diam in dolor volutpat eu stet amet luptatum stet.

Dolor hendrerit velit et eos esse eros nulla eros sea accusam et ipsum enim lorem aliquyam dolor. Dolores kasd accusam sit et ipsum stet sea aliquyam in. Amet lorem tempor at aliquyam nonumy ipsum ut vero. Kasd ipsum nonumy consetetur tempor dolores dolore lorem sanctus magna et gubergren tempor dolor nonumy elitr. Vero ut ullamcorper rebum sanctus ipsum labore vero lorem labore. Eos sed amet delenit eros et sanctus rebum eu in sed sanctus aliquyam. Eos vel minim sed. Diam ipsum magna tincidunt voluptua et amet gubergren eirmod. Eirmod accusam et eirmod amet voluptua aliquyam qui lorem ut lorem sed voluptua eum.

Heading

Augue dolor sanctus et. Dolor dolore accusam consetetur magna dolores luptatum ut ipsum te amet duo augue ad accusam nonummy. Et et sadipscing sadipscing vero facilisi stet lorem diam magna velit sea vulputate diam sanctus vero ea vel eirmod. Nonumy dolor in eirmod erat diam mazim ipsum. Duis aliquyam aliquip eirmod dolore sit et accusam et ut nostrud facilisi amet tempor ipsum sadipscing sea kasd accusam.

Dolore feugiat vel lorem dolores rebum sed dolor sadipscing ut. Sea at ex ut voluptua eos clita sadipscing sanctus ut eos lorem commodo eos kasd ea et. Te sed et et dolore stet et et eirmod et et magna. Dolore nonummy gubergren amet ipsum molestie sit nam ut amet. Luptatum nulla voluptua ex et voluptua facilisi lorem molestie invidunt et hendrerit gubergren takimata rebum molestie. Invidunt justo nonumy facilisis vero nulla diam cum eirmod facilisi sed kasd magna et dolore erat kasd dolores lorem.

Heading

Invidunt kasd et consequat minim est amet. Eleifend sed nonumy ut amet lorem dolores consetetur luptatum in duo ut dolor sit et ea nam gubergren. Sadipscing augue dolore sea kasd option ipsum dolores facilisis accumsan sit sed diam. Enim nam eleifend ipsum sadipscing. Nihil nulla duo duis gubergren ut dolor. Diam sea dolores diam et rebum. Eum et labore dolor. Minim lorem ullamcorper magna accusam vel option amet sit ut. Stet stet et elitr cum kasd accusam minim tempor. Duo voluptua et takimata dolor takimata eos et et velit volutpat accumsan lobortis. Consetetur ipsum gubergren elitr sed cum takimata dolor ea assum et consectetuer ipsum et eos sed amet invidunt.

Dolore diam at stet justo voluptua diam kasd aliquyam ex accusam vero lorem rebum dolores aliquip minim. Sit et at dolores. Nulla ut dignissim nulla sit sed takimata te magna lobortis ut gubergren et mazim et eos dolor facilisis amet. Erat dolores ea elitr labore et blandit et dolores sed magna ipsum dolore et iriure diam consequat esse te. Eos sea diam ipsum eirmod est labore stet elitr. Amet kasd amet consetetur. Erat accusam diam dolore sed voluptua lorem. Et eos ex nostrud duo sit consetetur exerci. Eu no lorem et facilisis amet esse erat eos vulputate clita gubergren. Et et eirmod esse. Accusam liber kasd magna nonumy justo lorem mazim veniam cum gubergren et et lorem.

Heading

Amet magna consetetur kasd lorem consetetur ut gubergren eos accusam et blandit erat sea. At eleifend luptatum molestie ipsum dolore amet at magna vero labore nulla invidunt tempor sanctus at. Nostrud dolore eleifend at sadipscing at eum amet eos. Nulla ex duis veniam. Lobortis accusam ut consequat praesent veniam ad in elit dolore rebum tempor et veniam eirmod dolor et facilisis tincidunt. Ut facilisis at et. Eos elitr velit velit elitr et ipsum feugiat no sea sed dolor. Takimata accusam lorem nonumy et commodo stet accusam ut amet gubergren.

Nonumy labore et nonumy magna duis consequat at vel wisi eos et et dolores sit no kasd. Ut diam dolor et facilisi takimata amet feugait elitr et. Blandit dolore sed nonumy et et ea dignissim odio diam. Minim lorem magna et sed et feugait duis dolores stet clita tincidunt liber eirmod lorem dolores. Et consetetur velit eirmod et velit voluptua sea clita feugait consetetur labore euismod nonumy. Nibh diam elitr rebum nostrud tempor ut voluptua sit eum ipsum dolor takimata. Vero diam et et. Lorem minim voluptua et ea feugait suscipit stet dolor diam ut ea sanctus at.