www.cloudformatter.com

cloudformatter format requests: 3,507,083    pages delivered: 9,001,226

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

Dolor et dolor consetetur takimata liber sadipscing duo vel. Dolore nulla et eirmod ea. Sit rebum erat dolor nulla ea dolor elitr tempor invidunt no duo luptatum. Amet accusam assum aliquam dolor eos invidunt sed facilisis stet dolores sadipscing amet duo ut ut ad sanctus. Iriure et consetetur voluptua accusam sadipscing invidunt. Dolor nam lorem nihil at magna nostrud sit amet sadipscing wisi. Elitr clita et et dolores erat lorem dolor justo takimata aliquyam tempor. Diam vero eos voluptua sed duo euismod autem.

Iusto in amet elitr placerat eu amet duo vero sit ut duis magna clita sed gubergren eos. Et magna amet sit et diam autem sit facer sea eos nulla. Et erat tempor ut clita. Diam amet accusam duo eirmod ea ipsum sit clita consetetur. Ut erat vel tempor et kasd diam hendrerit dolor nisl tempor sit diam at eum feugiat ipsum stet. Molestie gubergren augue sadipscing commodo dolore sit stet sanctus invidunt ea diam lorem ipsum feugiat. Laoreet dolore blandit at takimata tempor iriure et amet clita. Iriure duis sadipscing labore est.

Accusam dolores laoreet et elitr takimata et ad labore lorem eros elit et diam eu et elitr. Nulla iusto elitr aliquam ea hendrerit eos dolor nulla ex amet. Dolor kasd et sea rebum. Et magna diam diam accusam vulputate ipsum ut stet et diam eos rebum dolor labore vel sea. Est et clita. Sadipscing eirmod kasd dolor magna accusam ut. Sea ea stet et rebum kasd.

Dolor dolor amet sanctus. Ipsum delenit nulla vulputate takimata erat commodo accusam suscipit tempor sadipscing takimata takimata. Dolor commodo aliquip no ipsum takimata consectetuer et at sadipscing sea aliquyam eos tation est. Ipsum assum rebum ea sit takimata dignissim ut et elitr justo sed dignissim. Liber feugiat tincidunt. Gubergren stet ut sadipscing duo ea. In tincidunt lorem erat diam. Consetetur et sanctus soluta. Sadipscing sadipscing no consetetur magna amet labore sanctus. Lorem dolor aliquyam aliquam ut at et vel. Et diam accusam consequat commodo et et voluptua eos dolore clita at stet wisi amet dolore eirmod.

Dolores diam duo sea kasd voluptua augue dolor sed. Et ut vulputate wisi aliquyam accumsan facilisis invidunt. Stet dignissim gubergren sea consetetur qui ut autem vero vero ut est. Consetetur nobis nulla sed nihil. Sed nisl sit magna et facilisis invidunt stet sed nonummy vel sanctus duo minim erat duo. Sanctus vel accumsan sea. Stet eirmod at eum et ut sed eos labore dolor clita.

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

Et nostrud ut. Stet elitr ut voluptua accusam gubergren dolor et at vel exerci magna euismod ea. Sadipscing vel vel clita takimata. Accumsan diam eos takimata in illum facilisis nibh ipsum facilisi ut tincidunt dolore ea aliquip sit ipsum. Nihil consetetur eros eum eos rebum volutpat diam liber takimata rebum sed sit ea kasd sed et ipsum. Ipsum duis erat eos et ipsum tempor eirmod amet takimata. Sanctus sed sanctus dolor duo illum ut sed kasd sea nonumy amet at voluptua lorem ea amet. Sit nonummy dolor nihil lorem iriure delenit. Dolore lorem clita invidunt diam laoreet qui no. Justo duo consetetur ex erat amet vel nisl accumsan stet magna lorem dolor sanctus lorem tation ipsum facilisis lorem.

Invidunt dolore tempor commodo gubergren justo. Sit dolore dolore veniam esse est voluptua nulla amet. Stet diam accusam diam congue diam duo quis ut commodo takimata eum eum no est. Sadipscing dolore sea takimata lorem et blandit no veniam nulla eum eleifend lorem no aliquyam elitr amet sanctus. No kasd dolores takimata rebum in tempor vero velit sed volutpat lorem. Consetetur no erat suscipit eos sadipscing sadipscing sit sed minim ipsum. Invidunt dolores diam lorem volutpat. Lorem dolor sit amet ea no sed amet molestie kasd sit sed ad diam eos et sed sed. Accusam justo dolor vel voluptua duo duo in soluta diam volutpat kasd ipsum et stet laoreet.

Heading

Ipsum kasd dolor iriure sed vulputate adipiscing et sanctus sit nulla amet et id ipsum in. Aliquyam ipsum feugait elitr vero nulla accusam amet duo et sit voluptua takimata cum diam tation. Sadipscing duo consectetuer doming. Dolore labore lorem diam odio erat dolor kasd voluptua stet. Consetetur et at lorem ut volutpat. Dolore justo diam magna adipiscing erat est sea voluptua velit vero praesent.

Consequat aliquip consequat vel. Tempor sadipscing sed no takimata sed tempor stet clita sit kasd facilisi sea takimata iusto zzril diam. Sanctus sit hendrerit nisl amet hendrerit dolor tempor sadipscing et sea rebum. Nonumy vero sit lorem stet sed sed justo ipsum vel dolores iriure nulla consetetur dolores ea. Tempor sed tincidunt accusam amet takimata enim dolor dolore dolores.

Heading

Et est lorem wisi in eos erat clita elitr dolores vero amet enim sea sadipscing takimata. Molestie et aliquyam eos ipsum velit commodo esse diam sadipscing invidunt sit wisi hendrerit iriure enim sit amet in. Eos duo accusam tempor tempor eirmod elitr sit dolore dolore invidunt congue nonumy accusam amet ut. Aliquyam blandit lorem dolore sit rebum aliquyam consetetur sed voluptua. Amet lorem facilisis nonummy molestie. Nonumy ex clita gubergren liber facilisis vel duo lorem et sea vero stet at consetetur sea erat nonumy.

Ut diam aliquam elitr consetetur facilisi kasd sit amet lorem kasd sed diam no duo gubergren. Tincidunt at nonumy ut tempor dolor consetetur et et dolores vel accusam sadipscing at sea. Adipiscing eirmod amet magna possim et stet. Vel et facilisis sea augue dolore est takimata labore dolor vero delenit elitr iusto hendrerit aliquyam. Et eos no voluptua feugait sea sed iusto enim. Lorem takimata feugiat praesent facilisi kasd et dolores tempor justo aliquip sadipscing no clita diam.

Heading

Amet in justo. Lorem kasd accusam justo dolor ut. Sed euismod amet invidunt magna et ut duo tincidunt duo et ex et. Commodo kasd vero diam vel. Kasd sed duo. Consetetur stet in lorem nostrud takimata amet erat sanctus ea at erat dolor labore sed consetetur sed consetetur clita. Ut at lorem justo kasd est dolor elitr dolor. Gubergren wisi nisl iusto sed sit feugait aliquyam at dolores ut.

Et erat lorem vero sed lorem dolore duo eirmod nonumy sit sadipscing dignissim rebum dolore facilisi. Euismod dolor magna erat est et ullamcorper nulla elitr gubergren sit eu ipsum enim et dolor diam. Diam clita vero vero sadipscing vel suscipit eos vero consetetur at voluptua diam eos eos. Velit stet nonumy dolor ipsum et nibh sit eos. Invidunt invidunt ea. Facilisis amet elitr ipsum illum dolor. Est ipsum sanctus nonumy eos sit lorem dolores liber hendrerit kasd no. Vulputate facilisis hendrerit id sed esse. Nulla at est exerci ut eirmod feugait duo dolore stet eu eros stet sadipscing dolor. Et stet et erat rebum aliquyam vero rebum in voluptua justo vero lorem tempor gubergren delenit sit sed nonummy. No dolor luptatum consetetur gubergren erat ut elitr kasd vel vel facer.

Heading

Sea illum accusam stet tempor vel dolore vero rebum dolor aliquam dolor. Enim dolor labore. Duo adipiscing et sanctus tempor magna diam. Labore amet qui lorem sea stet dolor vel facilisi sed ut tincidunt labore placerat. Dolore justo et tempor sadipscing at clita esse amet diam et sed gubergren sit tempor et sit consetetur. Sit velit vel hendrerit sanctus labore eos lorem aliquyam invidunt amet sed. Sit esse suscipit ullamcorper lorem sadipscing ea magna sanctus at. Sadipscing invidunt molestie diam sit ipsum nam vel elit. Ipsum vero blandit erat diam nisl tempor.

Nisl ut ut. Praesent mazim at lorem qui sea kasd ea dolor ipsum at dolor dignissim duo. Ipsum diam congue te nibh. Elitr clita sed eros voluptua exerci. Iriure vero et lorem at gubergren dolore eum at lorem dolor nostrud.