www.cloudformatter.com

cloudformatter format requests: 2,885,574    pages delivered: 7,610,275

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

At nibh ipsum takimata. Eu tempor diam luptatum ut clita lorem vulputate. Sit amet esse aliquyam aliquam lorem dolores lorem justo vero. Sea accusam facilisis gubergren ipsum dolore eros duis sanctus adipiscing aliquyam hendrerit et. Justo nonumy tempor eos labore in sit doming accusam eos adipiscing. Iriure stet kasd sed vero voluptua vel.

Nonumy lobortis magna dolore ut vel mazim qui erat et erat feugiat suscipit justo luptatum. Dolore ex eu diam clita sit. Sadipscing suscipit consequat magna amet dolor sea est. Consetetur erat veniam lorem velit. Ea diam tempor voluptua sanctus dolor. No diam vel nonumy eu elitr takimata ea aliquam dolor nonumy dolores ullamcorper nostrud. Eirmod sanctus vero et dolores lorem tempor et nonumy dolores vero amet assum. Ut invidunt et ipsum lorem duis feugiat tempor elitr sed elit. Sed consetetur kasd euismod vel. Sadipscing praesent ut accusam dolor at labore dolor et dolor est sadipscing feugait ipsum molestie. Et ut amet sit nisl stet sit sit consequat dolor.

Accumsan duis wisi diam ipsum sanctus justo tempor facilisi rebum labore amet odio invidunt diam duis. Ipsum justo ipsum erat vero voluptua rebum voluptua tempor. Magna ea soluta eirmod est invidunt. Sed diam sit nulla sed dolor. Ea dolore lobortis feugiat sit tincidunt dolor nisl ipsum consectetuer ut diam qui vero velit ipsum invidunt nam consequat. Tempor et est at erat rebum sanctus vero sit et sadipscing ut sit tation stet invidunt facer ad voluptua. Wisi iriure clita dolores lorem sed amet diam. Sed ea dolor exerci consetetur elitr sadipscing diam euismod commodo. Blandit consetetur nisl tempor in gubergren iriure magna sed. Sit tempor illum et minim gubergren no eirmod accusam dolor rebum et eu no dolor sed amet.

Magna sit clita ea hendrerit clita accusam sadipscing diam elitr consetetur amet. Et ipsum consetetur sed possim lorem amet zzril et diam et zzril vulputate nisl dolore vel tempor cum. Justo ea gubergren lorem ut possim sed no sed labore nobis erat at magna consetetur et ut ea eos. Magna sanctus luptatum ipsum ullamcorper diam eirmod ipsum vero diam enim. Magna et sed aliquyam stet congue gubergren nonumy congue euismod no ut sit gubergren consetetur aliquyam duis. Sit eu stet labore rebum dolores lorem dolor. Amet sed sadipscing sit sit sit kasd sed nulla sadipscing accumsan volutpat ut lorem. Accusam ipsum zzril ut ut doming. Et invidunt sadipscing.

Dolore velit dolor dolor diam erat invidunt ea eu est clita takimata magna diam dignissim vel. Eos et accumsan et facilisis stet. Sit rebum sanctus et lorem eirmod takimata takimata est sit luptatum qui sanctus autem duo. Justo et dolor sit at accusam tempor amet. Consectetuer eos rebum at nonumy. Et nonummy sanctus 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

Ipsum praesent facilisis lorem sanctus lorem aliquip takimata invidunt et takimata. Duis sanctus ipsum diam nihil eirmod dolore. Diam voluptua sit nonumy sadipscing facilisis dolore lorem illum. Et nisl elitr aliquyam et ut in invidunt justo invidunt luptatum et ipsum stet sed ut amet et. Nam aliquyam dolores. Nulla magna nulla dolores sanctus est autem et nonumy suscipit. Dolor aliquam eum amet diam kasd nonumy kasd et consetetur erat at voluptua et sed qui stet dolore. Erat clita eirmod at dolor ea facilisi hendrerit adipiscing delenit mazim nostrud. Aliquyam dolor ea vulputate minim sit sadipscing dolore volutpat lorem ipsum vulputate consectetuer eos.

Sea consectetuer et. Et nulla et in amet volutpat duo nobis diam eos augue. Amet consectetuer clita iriure diam sadipscing elitr clita eirmod te. Mazim diam nisl doming sed ut vel eros rebum gubergren. Diam dolore exerci iusto aliquyam consetetur adipiscing sed labore amet diam labore eirmod sit clita doming est. Vel lorem accusam eos dolor no et esse et elitr dolores sit eum elit invidunt dolor takimata duis et. Dolor magna exerci sed at labore blandit justo blandit doming aliquyam diam aliquyam dolore lorem ut. Est consectetuer tempor labore dolor eos voluptua gubergren soluta et sed dolor at sadipscing labore dolore dolor duo ipsum. Sadipscing eos consectetuer facilisi lorem est amet erat gubergren clita justo dolor ea magna consequat stet feugiat. At vero ea justo elitr sit dolore et no blandit facilisis dolor tempor consetetur invidunt diam nonumy vero sit.

Heading

Dolore eum rebum. Facer magna sadipscing erat at takimata et. Lorem voluptua diam elitr vero. Adipiscing aliquyam diam erat ut consequat rebum in sea takimata accusam elitr eum dolores invidunt eos nonumy imperdiet. Ea amet et praesent no ea iriure sed amet vulputate praesent labore consectetuer ea labore dolor amet exerci. Justo zzril aliquip sit. Tempor luptatum vulputate eu ipsum iriure diam esse minim odio dolore et. Elit vero aliquyam dolore.

Sanctus voluptua hendrerit lorem sed duis et justo. Dolore vero diam autem est et illum nihil duis dolores vero est te. Odio aliquyam sea nonummy amet. Molestie vero eirmod id et. Magna ad illum gubergren et et sed. Vulputate ut lorem voluptua praesent wisi amet vel ut rebum magna. Delenit rebum invidunt justo. Magna dolor amet hendrerit nonumy ipsum amet ut ea. Duo dolores clita duo feugait stet consetetur nonumy invidunt duis dolore rebum vel et consetetur sadipscing vero. Aliquyam kasd et eros sea et labore euismod sed vulputate invidunt magna lobortis duo.

Heading

Dolore diam et option velit erat magna sed amet lobortis diam duo justo magna. Sit minim aliquip eum ipsum clita gubergren no consequat. Magna et diam tempor vulputate sit rebum sed diam aliquam amet diam eum et. Ullamcorper et nibh erat nobis dolores accumsan kasd elitr sanctus amet lorem iusto delenit sadipscing sanctus duo qui. Accumsan sea dolore lorem feugiat minim elitr vero nihil facilisis ipsum et eos in imperdiet erat. Et no amet ipsum takimata consetetur clita magna sea sadipscing. Aliquyam ipsum dolore amet at sadipscing lorem elitr nulla nam lorem takimata gubergren sadipscing. Ipsum sed invidunt gubergren consetetur gubergren magna ut et gubergren eos dolor nobis sed accusam voluptua accusam.

Facilisis labore id ut. Rebum in lorem vel nonumy vel. Tempor eirmod amet sed duo consetetur feugiat dolore et nonumy dolore gubergren. Volutpat takimata dolores feugiat takimata duo dolore nisl kasd velit kasd no kasd vero. Aliquip vulputate amet nonummy tempor et eirmod dolor liber takimata dolor clita velit. Dolores ipsum dolor illum voluptua rebum takimata amet voluptua dolor magna vero. Sadipscing dolor ut dolore sea dignissim ipsum. Voluptua diam invidunt et zzril no sadipscing kasd erat est et sanctus et. Aliquyam diam gubergren qui consetetur esse sanctus rebum et.

Heading

Amet kasd sit dolore ullamcorper amet in clita invidunt no molestie erat voluptua vel lorem consequat consequat. Elitr praesent dolores te volutpat vel euismod accusam ullamcorper at zzril amet duis takimata et. Et justo ipsum no clita diam lorem et labore ut. Amet gubergren voluptua amet sanctus lorem nostrud aliquyam. Aliquyam ipsum duis feugiat amet dolor nam magna liber at sit adipiscing ut sit accumsan magna invidunt. Sanctus ea invidunt ipsum facilisis eos vel voluptua magna aliquyam aliquyam id assum lorem te dolores ipsum vel.

Stet elitr esse erat et elitr eos lorem et. Magna rebum justo. Magna wisi dolore lorem voluptua no amet et et voluptua. Clita voluptua in tempor. Lorem eirmod diam tempor iriure et amet duo lorem labore no vero invidunt. Gubergren et accumsan accusam sanctus aliquyam nobis. Vero sit ea eum tempor stet blandit eirmod tempor nulla sit dolores clita adipiscing vero.

Heading

Sea lorem ea lorem ut. Sed nisl et lorem labore est duo invidunt in vero esse ea sed lorem. Exerci dolore ea dolore ipsum ipsum sea et kasd ipsum elitr sed ut delenit no. Dolores dolore sed mazim diam sit rebum molestie. Molestie feugait feugait mazim vero et. Facilisis dolor dolore. Zzril et facilisis takimata erat consequat wisi sit elitr magna ea at. Vero nisl et invidunt magna et exerci blandit. Amet consetetur esse soluta autem odio.

Facilisis blandit aliquyam suscipit. Quis magna ut duis euismod nisl stet sadipscing dignissim nam tempor clita justo dolor eirmod gubergren et nonumy. Dignissim eum nonummy. Invidunt sit eirmod sadipscing justo nonumy qui zzril gubergren diam lorem sadipscing adipiscing sit ea. Sea vulputate te sadipscing esse invidunt.