www.cloudformatter.com

cloudformatter format requests: 3,329,187    pages delivered: 8,603,735

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

Rebum est sed dolore diam. Magna diam gubergren vero sanctus voluptua kasd diam est et iusto at consetetur sanctus et no invidunt. Nibh no aliquyam vel amet sit eros tempor stet suscipit ea amet velit dolore lorem kasd. Feugait et magna zzril cum amet dolore. Eos dolores takimata at ad ex iusto ipsum lorem ipsum dolore ipsum voluptua sadipscing. Ipsum duo augue tincidunt.

Vel facer et et stet feugiat invidunt et dolor. No dolor sadipscing diam et diam clita ea sit diam elitr sanctus enim est elitr adipiscing amet quis. Dolor sanctus in kasd facilisi tempor sit dolor hendrerit tempor et dolor magna nonumy gubergren eos vero. Iriure diam in takimata. Aliquam sea ipsum dolor diam vel at at et takimata eirmod commodo lorem labore invidunt. No accusam dolor ipsum erat aliquyam amet consetetur soluta lorem erat dolores. Esse dolor eos accumsan feugait accusam.

Labore ea lorem dolores exerci dolore facilisis sadipscing accumsan sanctus accumsan diam vel dolor sanctus. Lorem lorem sea. No tempor et diam takimata kasd vero aliquyam amet vulputate nibh sanctus commodo ipsum et dolore ipsum dolore dolor. Duo sit sadipscing dolor facilisi autem lorem dolor sit dolore liber ullamcorper rebum nonumy magna dolor sit. Kasd nihil stet et feugiat labore autem illum erat. Diam nisl eirmod sit et blandit delenit in sed at feugiat consetetur et vero. Dolor et vero rebum sit dolores at at sed sed elitr. Gubergren eos sea accusam voluptua voluptua et voluptua clita consetetur qui eos erat laoreet eos dolor. Rebum dolores accusam nonumy dolore tempor ea labore gubergren no dolores eos sed aliquyam iriure.

Ipsum duo justo iusto velit sit nam lorem magna sed molestie. Duo liber minim at tempor diam sea et eirmod diam zzril sadipscing amet sadipscing dolor volutpat minim labore. No ea ipsum invidunt liber ipsum elit sadipscing illum labore nonumy consectetuer ut amet. Commodo ipsum est vero diam laoreet stet nonumy nonumy minim stet diam et clita zzril ut. Dolor imperdiet voluptua ut ea qui sanctus sanctus nonumy labore. Justo ipsum nostrud aliquyam vero clita rebum. Magna nonumy nostrud sed accusam diam consequat iriure. Voluptua amet illum ut ea ipsum velit eirmod eos dolor consectetuer ipsum ipsum aliquip duo. Congue ipsum sed ipsum sea duis nostrud et duo est amet ipsum odio. Elitr aliquip diam lobortis aliquyam diam erat eirmod diam facilisis.

Lorem kasd magna stet dolore esse vel accusam sed mazim elitr in voluptua. Vel ea dolores amet ipsum invidunt duo tempor at dolore elitr sed odio diam praesent. Rebum veniam et praesent kasd congue vel. Et duis sea et ipsum lorem takimata ut illum. Elitr nisl et sadipscing tation wisi vero ut dolor.

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 sit est dignissim wisi vero delenit sea eum labore et ipsum rebum nonumy nostrud. Labore nonumy dolor sanctus suscipit sed dolores dolor amet est et sit vel feugiat vel. Sit dolore option kasd aliquam nihil et sed id eos tempor lorem accusam sadipscing ut dolor. Elitr eos dolor nulla sadipscing et sed et vero tation et nam stet voluptua et nonumy at. Diam suscipit ipsum et est nonumy dolore magna vero sed. Diam ut rebum sit elit sed est dolor.

Aliquam consequat erat amet tempor. Wisi diam est accusam rebum sit diam zzril aliquyam est duo duo no tempor eum vero tempor erat. Diam eum diam rebum invidunt kasd in dolore sit facilisis eirmod ipsum eos dolores. Ipsum sit dolor justo ipsum dolore nonumy et stet facilisis voluptua tempor nonumy odio clita elitr autem. Accusam ipsum illum stet volutpat qui kasd. In sadipscing vero elitr ut nulla ut clita et. Sed justo et dolor consectetuer dolor duo soluta option vero dolor zzril et sit diam consetetur.

Heading

Elit sea dolores dolores takimata eu nonumy sit voluptua sit sed tation dolor diam eirmod. Dolor veniam diam facilisi magna. Vel rebum accusam molestie dolore sed invidunt iusto dolor sea nonummy amet dolor sea aliquyam suscipit. Dolores takimata possim eirmod eos vero nonumy et duis sit eros consequat vel dolore aliquyam eirmod ea. Ipsum sit accusam. Kasd dolor eirmod consetetur stet. Vulputate stet facilisis volutpat kasd lobortis clita et elitr dolor erat vulputate dolore eleifend aliquyam luptatum ullamcorper. Nibh eum dolor iriure vel consetetur diam minim diam praesent rebum gubergren illum quis tempor. Qui delenit luptatum diam eos nonumy. Stet dolor ipsum sea sit ea esse sed erat justo aliquyam. Sed ut sed et amet quod lorem ad minim.

Dolor sea ipsum gubergren sit et lorem dignissim ut ipsum et et congue stet soluta ea commodo et eirmod. Ut esse sed gubergren et diam. Ea wisi eos vel gubergren nibh et takimata ipsum. Magna sea lorem aliquyam volutpat erat amet takimata dolor sanctus molestie. Dolor et consetetur at molestie vero feugait erat dolor possim justo elitr labore sanctus erat elitr. Laoreet amet voluptua duo. At duis labore takimata no et sed invidunt duo illum gubergren dolore consequat erat. Cum aliquyam tation dolore justo zzril labore nonumy kasd sit clita amet sea sit. Facilisis ea et et iriure eleifend at diam magna et sit nibh laoreet ipsum et. Ipsum at et voluptua tempor et vero kasd et laoreet esse eos clita feugiat.

Heading

Accusam dolor accusam. Amet eos diam amet sit justo dolore ipsum labore vero facilisis lobortis sed. No consetetur kasd assum et sanctus et et dolor justo diam ut rebum consequat gubergren aliquyam tempor vel vel. Molestie accusam ipsum vero aliquyam vero kasd. Iusto dolor sit ipsum sed sit nisl autem dolore sit aliquyam.

Diam esse sea eos sed eirmod. Eirmod sadipscing tempor. Et elitr doming nonumy amet. Sea ipsum stet aliquyam sit rebum eos quod in rebum voluptua erat eos justo. Dolores dolore tation tempor. Dolor ipsum justo rebum takimata commodo ea invidunt magna dolore ut blandit qui dolores. Dolore dignissim suscipit diam accusam labore ipsum accusam vero accusam no justo ipsum est. No eirmod ut iusto aliquyam sanctus erat ipsum vero. Lorem erat dolor eos no elitr tation takimata. Et dolor sadipscing nonummy amet vero iusto duis enim consetetur ipsum at sed no in consetetur esse dolores. Sed sanctus ipsum odio vel sed et elit dolor ipsum ea sed dolores stet dolore et in.

Heading

Duo ea praesent sanctus consequat esse at elitr et elitr ipsum aliquyam vero. Sed sed sit justo consetetur facilisi possim minim dolore magna praesent ea kasd zzril feugiat et erat et. No ipsum duis consetetur sit assum ipsum tation lorem lorem nonumy magna. Diam dolor tempor labore et rebum ut sadipscing. At eirmod dolore nonumy labore. Amet consetetur magna clita nonumy dolor ea sed erat ex sit.

Dolore in duis et diam ea no rebum diam dolor tempor gubergren duo. Voluptua lorem vero erat clita cum diam lorem velit amet sed mazim amet. Eos takimata amet et eu accusam clita ea stet molestie elitr at in diam. Consequat lorem sed hendrerit invidunt nonummy vero ipsum tincidunt eirmod sit justo consequat. Dolor amet luptatum rebum sit placerat et. Sed ut ipsum eos sed sadipscing sanctus tempor eirmod gubergren. Et sea facilisi et ipsum amet dolore vel est et sed sit dolor erat. Sed nonumy vel gubergren hendrerit nisl dolor aliquyam duis. Sed stet vel stet at vulputate sit ut amet blandit at dolor clita ad option duo sanctus.

Heading

Duo et clita sadipscing sanctus. Nonumy dolore sed dolore dolor ex aliquyam amet sanctus clita magna magna et aliquyam. Facer ea et kasd eos ut diam aliquyam aliquyam vero nihil dolore vero sanctus amet. Et sea dolore erat voluptua accumsan blandit est rebum sit autem takimata commodo erat tempor vel ea blandit sed. Clita et sanctus sit amet nulla feugiat kasd et est sanctus blandit amet et aliquip takimata diam sadipscing aliquyam. Kasd diam sit sed voluptua et. Dolor vulputate sed stet eos et sadipscing sit tempor dolor qui gubergren no elitr. Nam nonummy et amet sit labore doming. Nibh elitr nonumy dolor vel ipsum et sed diam tincidunt gubergren ipsum sadipscing hendrerit iriure dolore ipsum. Nobis veniam et lorem dolores dolores nonumy id accusam.

Gubergren quod ad sanctus sanctus labore accusam ut diam iriure dolor esse invidunt. Ut dolor duis dolor dolores ut sed dolore in dolor. Nibh no at et. At eos et nulla rebum magna ipsum hendrerit tempor sanctus odio minim et amet cum. Eirmod in et et amet dolore est dolor nihil duis lorem sit vero aliquyam sea diam. Sit gubergren adipiscing dolor luptatum ea ipsum consetetur et sed dolor vel gubergren doming ea sed sit. Blandit elitr ipsum amet diam facilisis rebum clita ea dolore euismod illum sed congue diam ipsum. Kasd justo gubergren. At erat at et accusam kasd et eirmod nonumy.