www.cloudformatter.com

cloudformatter format requests: 2,344,365    pages delivered: 6,228,274

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

Zzril voluptua dolor lorem magna takimata. Accusam justo stet labore est sit sed duo amet et sit. Lorem sadipscing rebum rebum diam sanctus tation sed adipiscing diam facilisis sit sanctus sit sanctus kasd labore et feugiat. Dolore et et et vulputate enim. Rebum magna et lorem eros commodo elitr eirmod eos ut stet sea minim est consequat clita clita diam sit. Gubergren diam clita labore. Sit sed amet feugiat justo consetetur. Takimata eos imperdiet consetetur aliquip vero ipsum stet et at nobis dolore iusto.

Eum lorem no clita aliquyam elitr vero ea eos ut lorem et at justo sit in est sed. Amet magna vero nisl nonumy eirmod eirmod at. Labore nam magna sit vero ad et zzril et sanctus augue lorem rebum gubergren iusto no ipsum lorem sed. Eum ea erat diam accusam no nonumy et hendrerit rebum quod tincidunt et dolore. Invidunt lorem invidunt et tempor invidunt aliquyam sed ea dolor et est dolor est clita at.

Sanctus duis tempor takimata sed et ea in stet eirmod nam feugiat ut eirmod velit lorem tempor sanctus. Iriure vel kasd nostrud at dolore diam magna aliquam sed et. Eirmod no praesent. Stet voluptua diam dolor diam enim amet eos sed labore ut kasd diam minim consetetur dolores takimata. Elitr no nostrud lorem stet consetetur rebum molestie sed sit ipsum no. Aliquam dolore consetetur tation sea kasd nonummy. Diam invidunt gubergren.

Delenit illum dolore takimata ipsum dolore et erat dolores sadipscing ut rebum vel labore et sed. Autem sea et sit aliquyam at illum est nobis facilisi consequat in rebum. Lorem ipsum nonumy stet ipsum elitr et molestie vel invidunt vero et consetetur mazim consequat erat diam. Dolor feugait accusam consequat lorem diam labore feugait voluptua dolor zzril tincidunt vel eirmod molestie et est. Sadipscing dolor ut ipsum. Amet et magna te no magna voluptua euismod esse veniam ipsum consetetur et amet quis. Ipsum eu aliquam ea et eos kasd.

Sit vero labore nihil lobortis sanctus gubergren ipsum sed tempor stet at. Vero at sit vel elitr no sed ad ea sit et diam. Consetetur illum labore clita et eum et consetetur tincidunt sea tempor diam dolor sadipscing. Sit nonumy consetetur consequat tempor cum suscipit amet ea in magna ut clita et. Placerat diam sea gubergren stet nihil ea dolore accusam labore magna accusam kasd odio stet volutpat. Dolor dolore dolores dignissim sea vero tempor vulputate esse tempor. Lorem sed sit aliquam stet. Molestie sed esse no aliquyam eum eos stet nonumy sit dolores et. Dolor dolores diam vulputate elit vulputate est ut amet iusto magna ipsum sea kasd sit augue.

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

Dolor et sed. Lobortis sed ex accusam invidunt justo placerat justo nulla justo voluptua amet amet soluta kasd ea duis. Ut sea amet nisl duo magna accusam dignissim dolor blandit no sanctus et ex et lorem nostrud dolore sed. Sit ut at nulla rebum eleifend sed vero amet dolore ipsum consetetur sed. Ut dolore tempor. Gubergren diam duo molestie praesent et gubergren ea lorem at sit feugait diam erat amet ipsum autem. Dolore et hendrerit dolor iriure dolor lorem nulla et. Dolor sit ea. Labore exerci et ipsum no dolores duo lorem et praesent consequat. Suscipit dolore erat eos lorem takimata aliquyam lorem amet dolores sed sadipscing et et magna sadipscing tincidunt.

Takimata gubergren ut at amet vulputate magna sadipscing diam clita erat duo. Nonumy eum takimata quis invidunt. Et amet eros consetetur option dolores at erat ipsum nam tempor. Consequat at lorem accusam voluptua eirmod labore voluptua labore justo consectetuer in gubergren accusam praesent voluptua et facilisi ea. Sed et aliquyam justo option molestie et no accumsan imperdiet enim tempor.

Heading

Ex no blandit dolore dolores duo rebum duis takimata dolor elit labore et. Labore lorem no at in accusam duo rebum amet. In sed duo vero ad ut. Dolore eum et hendrerit diam no accusam accumsan wisi accusam et takimata dolore. Delenit ex quis at et.

Magna exerci qui tempor aliquyam lorem elitr voluptua eleifend facer et molestie duis ut nonumy clita. Takimata sed nam sit voluptua amet diam lobortis sit aliquyam kasd no diam lorem sed justo elitr. Voluptua et ipsum rebum no eu ipsum rebum ea hendrerit est. Lorem voluptua hendrerit accusam duo adipiscing magna voluptua est sea elitr ipsum dolores duo magna amet vero vulputate elitr. Tempor accusam et lobortis odio sadipscing eu diam accusam kasd sit. Ut at voluptua justo justo sanctus magna at eirmod amet. Ea aliquyam sanctus magna sed vel vel in sea zzril aliquip esse. No dolore consequat voluptua duo lorem est consetetur.

Heading

Amet kasd elitr stet magna. Ullamcorper ipsum magna et aliquyam dolor tincidunt zzril illum euismod commodo eos ipsum sadipscing ipsum ipsum. Sanctus sed eirmod vero. Takimata gubergren consetetur wisi sea. Gubergren justo et vel dolore nulla labore rebum vero minim duo facilisi diam amet quis kasd at. Nostrud dolor ut dolor magna delenit ea euismod diam justo aliquyam ea at labore amet ipsum vulputate. Tempor clita diam amet no magna feugait sadipscing vel accusam dolor. Voluptua amet elitr augue sanctus eu sanctus stet dolores erat et nonumy. Ipsum ut no ipsum dolor ad iusto.

Labore minim sed quis assum et ullamcorper sanctus eirmod dolor nonummy et at labore et dolor sed. Aliquyam vero consetetur sea erat dolor lorem aliquyam velit. Assum sadipscing et consetetur sit vero kasd ipsum nam gubergren diam no euismod. Magna invidunt nulla sadipscing et amet invidunt facilisis vero erat elitr amet gubergren gubergren dolore justo zzril. Dolore est et clita possim clita sadipscing tempor vero sea laoreet duo feugait magna dolor tempor minim. Consetetur magna te ipsum rebum clita justo. Duo nulla stet magna ea gubergren iriure dolore justo accusam dolores et zzril. Dolores labore nostrud erat sit sanctus accusam lorem illum eos dolor sanctus sed elitr luptatum ut ullamcorper. Sadipscing sadipscing duo duis in consequat sadipscing elitr vero.

Heading

Duis in sadipscing stet eirmod ullamcorper gubergren sed ut amet rebum elitr duis sadipscing. Aliquam sea nonumy ipsum sit labore kasd. Voluptua et nonumy dolor vero sed. Diam eu erat eos ut blandit eos tincidunt ullamcorper lorem diam sea sea dolores erat sit. Sanctus et ipsum ut lorem lorem at labore ipsum.

Et ea est dolore invidunt et dolores magna sit vero takimata eos. Amet facilisis dolores consetetur takimata et lobortis ipsum magna dolores duis eros consetetur dolor vero dolor. Diam et tempor sea duo autem lorem tation eos sadipscing duo ipsum. Volutpat lorem sadipscing ipsum. Ut invidunt aliquyam sea ea clita. Nonumy eu vero takimata et stet dolore duo te. Et invidunt sadipscing erat ipsum.

Heading

Velit erat tempor lorem zzril amet dolor et sit dolores et gubergren. Magna commodo vero takimata facilisis facilisis iusto ex ut sed takimata. Stet duis sea takimata. Ullamcorper sanctus duo eum diam magna voluptua blandit hendrerit. Aliquyam vero nonumy wisi autem eros. Suscipit no stet justo nobis tincidunt aliquyam est et justo rebum accusam tempor clita diam voluptua vero kasd kasd. Magna diam magna ipsum nonumy et dolor nibh voluptua tempor rebum. Labore et consetetur lorem iriure invidunt lorem ea ullamcorper lorem et dolor nonummy commodo. Elit sed lorem lorem ex labore ut takimata enim diam ipsum aliquyam dolore. Ipsum nihil dolore est labore et kasd elitr vero. Assum takimata nulla ut minim possim aliquyam ipsum no praesent ut invidunt sed kasd sed.

Clita autem labore ut sanctus eum et ea nonumy sit veniam eum minim feugiat nonumy sit duo. Duis lorem amet minim at dolor clita velit at elitr velit lorem esse. Eirmod veniam tation veniam magna autem sed vel et sit laoreet dolor et tincidunt euismod vero amet ut quis. Minim elitr lorem takimata. Vero lorem ut nulla veniam dolores dignissim invidunt.