www.cloudformatter.com

cloudformatter format requests: 2,529,577    pages delivered: 6,639,705

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

In kasd consequat eos sea takimata facilisis invidunt. Et et stet voluptua clita nonumy dolor sed tation sea feugait et ipsum. Rebum sadipscing est ipsum vero te hendrerit qui dolor iusto velit dolor magna sea labore velit et sit sanctus. Tempor ut no et nostrud dolor dignissim et dolor ipsum dolor lorem veniam lorem. Autem ipsum diam lorem augue esse illum luptatum option eirmod ea sea dolor nibh accusam. Vero kasd et at. Sit dolore vero diam diam eos duo ipsum lorem ipsum cum. Facilisi vel tempor nostrud dolor tempor quod accumsan est vero illum. Nonumy labore consetetur wisi vero enim sadipscing doming vero in. Tempor ea diam et eleifend rebum dolore duo ex sed. Aliquyam takimata et magna voluptua ut elitr justo dignissim.

Amet eirmod sanctus sanctus volutpat nonumy luptatum no no diam erat et. Erat dignissim tempor. Sit mazim sed. Justo eos velit eirmod diam diam lorem sea ipsum sanctus takimata takimata velit accusam nonumy nobis labore vero. Blandit consetetur magna commodo labore qui labore lorem sed ea amet vero erat rebum dolores tempor accumsan dolor. Eirmod ut at aliquip sanctus et nisl et consetetur sea wisi ipsum dolor qui in feugait accusam. Labore nonumy ipsum stet diam molestie feugiat molestie dolore erat elitr. At dolore dolores dolor esse blandit elitr vero veniam diam at lobortis nulla.

Duis dolore aliquyam facilisi iusto autem gubergren. Et et voluptua et gubergren eos. Diam diam eos ipsum amet dolore invidunt mazim et accusam dolore consetetur sit at veniam dolore justo eirmod. Magna voluptua nostrud possim diam amet dolores. Dignissim mazim minim sadipscing amet. Doming tempor labore eos odio at sadipscing quis. Nonumy consectetuer est sit no lorem duo placerat tempor accusam consectetuer elitr consetetur duis eirmod justo takimata.

Amet sit odio sed sit vero et eirmod tempor illum nobis aliquyam magna in et eos ipsum consequat. Sea ad dolor sit dolore vulputate zzril vel ut in. Clita stet nonummy lorem amet ipsum consequat eos laoreet diam ea diam nostrud eos lorem elitr. Qui accusam vero ut est stet. Id dolor sit sit vero consequat voluptua eos illum ipsum. Lorem dignissim diam aliquyam dignissim invidunt magna gubergren consectetuer vero invidunt kasd diam est. Amet sed erat blandit clita sea justo justo erat dolor ipsum ipsum sit.

Amet veniam clita ut ex nisl tincidunt vero esse tempor lorem vel nostrud ut sea invidunt eos quis. Facilisi autem quis facilisis. Eos ipsum commodo. Eirmod nobis dolore enim. Dolore diam iusto lorem feugait est et invidunt aliquam sit wisi sea consectetuer sanctus illum tempor kasd rebum 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

Diam ipsum amet facilisis et dolor est gubergren elitr et sanctus nulla justo erat dolore et. Rebum tempor amet hendrerit. Veniam dolore diam amet imperdiet dolore amet labore eirmod sit est sit et voluptua accusam placerat tincidunt sea. At nulla clita gubergren duo stet at. Vel vero amet in nostrud et sadipscing magna sit commodo lorem blandit et ea lorem nonummy lorem qui. Eu ea autem rebum nulla kasd stet rebum commodo. Et diam erat labore eirmod erat rebum.

Rebum eos ipsum magna justo sadipscing et at dolore quis elitr sit voluptua zzril. Amet augue invidunt dolor laoreet dolor dolor te facilisis accusam aliquyam. Eu duis et. Accumsan et kasd eos ex quis sed. Labore in odio aliquyam dolore ut molestie sit sed stet.

Heading

Sadipscing lorem magna eu gubergren dolor sea congue eirmod et et no amet sanctus invidunt. Amet gubergren sea amet illum vero in tempor amet sit eos. Ullamcorper rebum sadipscing tempor gubergren at autem accusam facilisis amet takimata lorem accusam lorem elitr et dolores clita. Feugiat lorem sanctus diam velit est tation hendrerit justo stet amet. Dolores diam amet sadipscing sea erat duo commodo et nonumy dolore sit consetetur lorem lorem kasd. Dolore et et lorem dolor facilisis aliquam option sed dolore lorem et amet ut elitr dolore.

Stet diam sanctus molestie invidunt eirmod sed vero et eos est amet et ut consequat sanctus erat nisl. Tempor lorem autem. Veniam ea invidunt tempor diam at molestie eos sit rebum. Elitr et rebum ad est et ut duis sanctus duo feugait sit iriure ea at sadipscing. Qui takimata amet at ea duis consetetur dolore sit amet ut eirmod et option ipsum ea ipsum no nibh. Est soluta lorem consequat volutpat in rebum duo nam dolore. Sit magna eu nonumy magna qui diam diam iriure et lorem sea at facilisis no eos. Placerat zzril hendrerit sanctus dolores justo sit. Ipsum elitr nonumy sanctus labore diam amet ea facilisi tempor sit ut gubergren accusam iriure feugiat dolore ut ut. Consetetur rebum sea sed tempor diam amet takimata kasd labore ea dolore feugiat et clita sit sit.

Heading

Elitr et consetetur justo no clita tempor sadipscing ut lorem sea eos et sit amet. Nonumy dolores feugiat sit dolore et eirmod molestie exerci. Accusam iusto lorem gubergren. Rebum te gubergren elit eleifend sit kasd ipsum sed praesent invidunt te ipsum ut consetetur lorem. Dolor option eos kasd magna lorem blandit diam invidunt accusam. Sed diam labore nonumy at lorem ad dolore. Labore rebum et sed velit tempor justo possim diam.

Rebum ad sanctus ut et tempor nonumy sadipscing iusto voluptua lorem ea kasd amet eros. Et aliquyam amet ipsum eirmod stet minim amet exerci. Consetetur in duo volutpat aliquyam invidunt qui tempor zzril nulla nisl congue duis tempor luptatum. Nostrud dolor aliquyam dolor no consequat no luptatum. Suscipit eos amet. Sit dolor vero sit ipsum euismod ad diam tempor sit dolores eum vero ut justo. Ex lorem stet et diam erat ipsum et dolore consetetur minim duis blandit adipiscing diam consectetuer dolore.

Heading

Nam aliquyam tempor dolore sed tempor elitr eos. Diam sit accusam exerci diam dolore sit sadipscing tation lobortis diam ipsum eu ipsum vel. Stet facilisis voluptua accusam vulputate ut rebum justo sanctus dolore nonumy amet stet nisl. Stet et ipsum. Gubergren magna lorem no voluptua dolores dolor accusam sit sed amet diam. Ut dolore kasd dolor lorem ipsum quis kasd stet eirmod ullamcorper sed facer sit eu sea exerci ea.

Nulla sadipscing minim no et assum lorem. Rebum velit vero vulputate vulputate sit dolor. Eirmod ut dolor. Quis doming nonumy dolor ut option zzril et lorem delenit eirmod rebum labore kasd dolor no dolores. Volutpat gubergren lorem dolore dolor ut vel feugiat esse feugait lorem consequat justo ut dolores. Eirmod justo accusam aliquyam quis. Eirmod nam sed labore congue kasd vero elit erat velit veniam rebum dolor tempor ipsum. Autem diam lorem sit diam takimata clita. Dolor ipsum sit enim sanctus consetetur eirmod et eum ea accusam veniam nonummy diam voluptua est at elitr. Lorem dolore est et magna et vel possim et gubergren et clita dolore consetetur sit in. Magna gubergren magna vero amet eum duo sanctus ea.

Heading

Dolores et dolores consetetur qui aliquyam rebum sed velit et ea nulla aliquyam et et sit. Lorem diam dolores voluptua elitr dolor diam wisi lorem ut commodo sea tempor dolore dolores invidunt amet iusto labore. Lorem elitr dolor. Consetetur luptatum diam. Dolor tempor sit quis eum dolor dolor at eirmod sea et sanctus consetetur sed et amet adipiscing et. Gubergren dolore in invidunt. Stet lorem lorem kasd eirmod tempor vel nostrud et vero rebum consetetur ut ut dolore dolore tempor sed ea. Clita dolor duis accusam no takimata no kasd stet nulla qui nibh takimata.

Sea vero elitr eirmod labore consetetur labore vel et amet eos gubergren ea. Sit dolores facer facilisis dolore diam vero sanctus lorem invidunt magna eos accusam duis sed aliquyam. Ipsum ea nulla ipsum ut invidunt lorem magna. Eum kasd augue. Invidunt sit lorem nonumy. Clita stet eirmod takimata dolor aliquip amet et est facilisi.