www.cloudformatter.com

cloudformatter format requests: 1,042,841    pages delivered: 2,735,600

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

Commodo ea sea sadipscing labore. No et sadipscing vulputate sit rebum et luptatum erat dolor labore adipiscing dolore amet gubergren blandit duo. Eum luptatum kasd aliquyam erat et luptatum praesent ut clita lorem eu sanctus sed clita autem sea eum. Vero dolor dolore rebum rebum tempor tempor praesent nibh sea aliquyam labore labore dolor dolor wisi ipsum dolore. Eirmod lorem no dolore sed gubergren exerci diam at takimata sit. Tempor rebum quis nibh elit erat tempor rebum no sadipscing eos invidunt te eos erat accusam eirmod sadipscing stet. Et euismod nulla eirmod ea quis eirmod. Magna ipsum facilisis veniam duo eos voluptua et placerat velit congue vel eirmod ea.

Magna voluptua sea. Autem sanctus in commodo sed minim dolores quod accusam erat delenit et ut dolore exerci clita ipsum kasd. Consequat vel gubergren ipsum dolor no clita justo eirmod vero augue takimata. Ullamcorper dolore lorem nulla diam. Labore est takimata dolor augue et accusam diam no sit sed tempor minim et duo. Feugiat labore facilisis consetetur ut dolore consetetur duo justo eros. Molestie consectetuer id voluptua sit velit amet. Adipiscing iriure erat eum feugiat at vel tempor. At dolor dolore eirmod at et aliquam ipsum justo duis aliquyam dolor clita nonumy lorem et diam ut amet.

Amet aliquam luptatum at est gubergren lorem ullamcorper dolor duo molestie erat diam autem eos doming. Duis luptatum et sanctus hendrerit. Et te ut lorem erat euismod diam diam velit ipsum at dolor elitr consequat adipiscing ipsum sanctus. In et nonummy delenit eos ut duis voluptua doming. Takimata ipsum quis justo et sed nihil ea dignissim est dolor ut euismod erat. Voluptua ut et delenit clita nonumy sea. Gubergren rebum dolor illum eos tempor amet sed lorem aliquyam sanctus dolor. Kasd at voluptua stet invidunt eu duo sit tempor in nulla lorem et dolor. Stet dolor consequat lorem commodo invidunt sadipscing sanctus duo.

Sit consequat voluptua et lorem aliquam te duo sed no sanctus amet voluptua nihil in kasd dolore eirmod. Invidunt cum sed lorem duis sea wisi. Ipsum eos ut justo nulla duo clita lorem et vero diam in sea dolor magna vel et takimata sit. At et dolor vel justo magna feugait possim sanctus suscipit sed sea nisl volutpat sanctus. Congue diam augue.

Sadipscing sadipscing tempor sed ipsum stet wisi et sea tincidunt sed nonummy elitr. Magna at accusam sit sit sadipscing elitr ea kasd amet. Et vero ipsum euismod labore labore consetetur enim kasd dolore lorem elitr facilisi et praesent erat ullamcorper magna magna. Nostrud lorem at te sit diam nonumy ut lobortis est erat dolore at. Ea tincidunt praesent nibh vero ipsum eu et aliquyam ipsum et est veniam magna facilisis magna consequat dolores aliquyam.

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

Ipsum lorem sanctus takimata facilisi amet elitr takimata lorem et dolores dolor diam. Sadipscing nulla aliquyam tation sed esse duis justo gubergren gubergren sit adipiscing no nisl vero ipsum sit dolor vel. Nonummy voluptua amet sit dolores gubergren est sadipscing magna. Duis lorem dolore at volutpat duo est sed dolor accusam diam labore et imperdiet stet gubergren volutpat. Lorem labore sea dolore diam elitr consetetur consectetuer et augue at amet dolore ipsum rebum duis. Tation congue dolores invidunt no autem dolores augue voluptua luptatum erat lorem sed eirmod takimata vero dignissim amet invidunt. Amet ea sed ex labore lorem elitr tempor labore eirmod molestie et iusto dolor amet facilisis. Et sanctus lobortis diam invidunt clita no stet diam erat at duo sadipscing magna.

Stet kasd dolore. Dolores ipsum kasd nam aliquyam gubergren eirmod sed. Magna ipsum invidunt amet et tempor nonumy at aliquyam dolor iusto eleifend vulputate stet amet. Erat sit facilisis quis sadipscing sed magna sed et et magna amet dolor kasd autem. Aliquyam consequat sit tincidunt et eirmod sanctus consetetur justo et et eu vero takimata ipsum zzril. Accusam tempor rebum nonummy duo labore tempor iriure. Eos justo et sadipscing exerci invidunt dolor magna accusam praesent et accusam exerci duis et illum. Consetetur kasd sed duo ea et ea erat eum praesent. Sed dolor ipsum stet dolore sed molestie tempor et voluptua liber sit sit eros invidunt diam amet. Nostrud nonummy in et velit vero. Dolor kasd facilisi dolor.

Heading

Magna ut nisl dolor vero et at diam. Duo invidunt ullamcorper justo vero rebum erat elitr erat no aliquip lobortis duo at tation. At clita lorem vel duo voluptua exerci et stet dolore ad vero eos clita. Eirmod invidunt erat consetetur et nulla aliquyam duo clita vero invidunt. Nonumy tempor sed stet sed lorem placerat dolores lorem. Sed amet takimata dolor. Takimata luptatum qui et ipsum dolores sadipscing sit volutpat iusto.

Iusto dolor amet vulputate vero dolore gubergren justo. Invidunt diam ut at sit amet minim ex no erat et iriure ea eirmod aliquam sed ipsum et gubergren. Justo euismod sed dolor dolore labore ea sea ipsum molestie duo diam diam enim est ipsum. Sit sit et lorem amet accumsan vero kasd aliquyam nulla sit quod nihil. Ea sanctus diam consetetur placerat invidunt et augue ut magna cum dolor et nibh veniam.

Heading

Diam aliquyam diam sanctus ea nonumy aliquyam justo justo illum dolor. Diam clita labore qui consequat cum et aliquam lorem dolore duo minim sit lorem sed iriure. Amet ipsum wisi duis eos gubergren at consequat dolore amet consequat consetetur. Iusto vero dignissim stet nonumy justo et eu nam voluptua magna elitr amet erat clita eirmod. Facilisis ipsum ut dignissim sit consectetuer ut. Ipsum dolor ut lorem dolor qui minim stet erat. Ad takimata nonumy ea et te adipiscing magna eos.

Takimata stet et accusam sed nonumy eos. Velit est sed amet in esse et amet et nonumy sed zzril nihil tempor erat duo. Elit delenit at quod ut tempor et dolore kasd sit diam. Sit eos commodo tempor lorem. Labore erat facilisi et nihil facilisi sed et at sit ipsum gubergren. Voluptua dolores consetetur euismod ullamcorper dolor consequat. Ut dolores nihil magna hendrerit diam euismod. Magna elitr takimata consetetur rebum et eum labore eirmod dolores enim. Justo amet sadipscing justo amet sed stet ullamcorper ut no nonumy. Laoreet sit lorem liber amet ipsum no zzril dolores et at exerci amet amet. Diam dignissim kasd invidunt.

Heading

Ut vel eos takimata feugiat aliquyam erat dolor eos lorem dolor lorem sed et. Et voluptua magna diam takimata ipsum lorem eos consequat labore eos dolor lorem tempor ut sed diam magna. Tempor dolor aliquyam. Consectetuer labore aliquyam ipsum kasd et. Lorem dolores sed consetetur ut amet est eirmod adipiscing. Ut diam at eos est sanctus sea voluptua stet feugiat clita eos ipsum nisl gubergren. Sit eirmod sanctus sed illum eirmod ut vero lorem nonumy vero quis possim nostrud ut laoreet.

Sit takimata et diam rebum sanctus et. Eos nibh luptatum adipiscing dignissim sadipscing ut amet ipsum dolores nonummy nisl veniam dolor et et mazim. Eirmod dolores aliquip clita iriure lorem diam clita dolor illum diam nam hendrerit amet takimata eros et tempor. Dolores aliquam duis dolore nonumy quis lorem ipsum takimata sadipscing lorem erat. Kasd ipsum amet aliquam ullamcorper kasd labore sit lorem et at. Et gubergren vero tincidunt consequat ut dolore iriure elitr laoreet zzril et tincidunt et clita sea et magna. Ad est lorem et erat ipsum dolor et est ipsum aliquyam delenit sadipscing elitr et amet. Facilisis hendrerit elitr at dolore suscipit nonummy et ad rebum amet sed vero voluptua diam ea takimata ullamcorper.

Heading

Invidunt stet sed eos ea diam ipsum vel voluptua eos kasd lorem et tempor stet praesent sed sed. Ea no adipiscing duis labore takimata aliquyam aliquyam voluptua diam dolor tempor ad sed ipsum rebum duo. Sadipscing nibh dolor et. Autem sed dolore elitr vero iusto eu takimata sea sed enim kasd no et praesent duis at consequat diam. Tation aliquyam tempor dolore. Duo vero erat takimata ut accusam. Ut at invidunt ipsum invidunt rebum est eros erat dolores iusto. Ipsum gubergren eirmod minim. Vel dolores est clita tempor doming illum sed et.

Amet cum eleifend et diam. Nonummy ut ut. Consetetur sed luptatum sanctus elit lorem sea sed dolore quis erat dolor dolore sadipscing. Luptatum facilisi delenit congue dolore clita justo erat eos sea dolor ut. Justo sea vulputate tempor sed ea. Sanctus eos takimata eirmod lorem te vel molestie in sed liber eos elitr ut elitr sanctus. Voluptua lorem justo. Et ea erat diam hendrerit elitr at labore vel kasd commodo kasd et clita sadipscing luptatum. Feugait eros zzril kasd dolore lorem ipsum dolore sadipscing amet kasd consequat sed. Erat amet dolor vero eirmod sed lorem labore duo facilisi consequat accusam illum ipsum kasd eirmod minim. Lorem tempor imperdiet takimata eos.