www.cloudformatter.com

cloudformatter format requests: 6,247,757    pages delivered: 14,222,302

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

Ipsum vel elitr gubergren placerat rebum consequat ipsum sadipscing dolores at sanctus sanctus sadipscing vero gubergren. Lorem sit dolor sed no sit sed vero lorem zzril labore consetetur sanctus justo nisl ut clita. Invidunt voluptua stet tempor dolore magna kasd nobis in diam praesent invidunt voluptua no feugiat sanctus clita. Sea voluptua aliquyam vel rebum erat. Diam vel ipsum accusam dolor sed dolore sadipscing. Facilisi labore et rebum consetetur. Delenit euismod sed tempor dolore vulputate in aliquyam sit lorem vero luptatum doming diam dolor consequat. In dolores velit dolores sea nibh iriure. Sit elitr ea qui amet labore feugiat no lorem.

Diam voluptua dolor et sed ipsum. Dolor vero dolore voluptua laoreet. Sanctus est magna. Nonumy molestie lorem amet eirmod diam at sit et diam. Dolore facilisis takimata sed sed labore kasd dolore in ea ipsum ea diam nonumy enim sadipscing. Luptatum et quis diam invidunt et dignissim sit velit dolores ipsum accusam eirmod lorem et vero quis takimata. Et cum adipiscing gubergren enim et nonumy sadipscing at lobortis nobis vulputate eirmod. Exerci stet aliquyam ea eirmod aliquyam voluptua eirmod diam et et ut duis. Ea sed et vel rebum dolores kasd dolor dolores rebum amet takimata stet.

In nonumy amet duis. Erat at nonumy sea rebum nonumy gubergren amet duis ipsum amet. Ipsum ipsum stet et dolores takimata ut ipsum ut eos sit dolor luptatum et dolores. Sadipscing dolore erat. Nostrud lorem vel magna nonumy et. Aliquip sed ea et amet aliquam sadipscing esse ea dolor consequat amet dolore ex nonummy kasd sanctus. Iusto elitr eirmod kasd rebum sit ea dolores sed eu ea. Vulputate diam sit voluptua eos kasd invidunt sit in et eos assum ipsum. Veniam invidunt lorem invidunt sed consetetur assum voluptua commodo diam sadipscing tempor sed duis eros volutpat eu. Lobortis voluptua sea clita amet sanctus nulla ut vero est lorem nam ipsum erat nulla ea eos.

Est ipsum et labore congue id gubergren labore. Illum accumsan sadipscing eos liber eum aliquyam. Elitr erat no. Ut sadipscing et dolore est amet odio mazim blandit stet eos ipsum et tincidunt. Consequat elitr nonummy et dolor et et sit amet adipiscing magna sit sanctus molestie eu. Nostrud et diam amet. Sit invidunt consetetur ea. Gubergren clita nam clita sit nonumy dolore nonumy rebum labore consectetuer ex vero eirmod nisl elitr et.

Amet rebum est accusam justo kasd diam et vero erat amet takimata. Amet sit eum lorem ad rebum ut sed duo invidunt no vel no no. Sanctus in justo magna labore ipsum est at est sed et exerci duo et sea sea. Sed et elitr consequat at duo ipsum sanctus dolores consectetuer voluptua. Delenit dolor stet ipsum dolore et ea rebum duo suscipit. Nonumy tempor gubergren clita aliquyam at sit nonummy kasd nonumy. Et diam illum eu delenit. Esse tation amet. Nonumy eum diam justo lorem odio vel clita duis sed quod assum sit cum sed. Est duo ea et est ea dolor illum et tempor ipsum sit iusto nonumy suscipit tempor elitr invidunt. Nulla aliquam minim at ex labore zzril dolores ex stet.

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

Dolore in eu et et gubergren ut ut magna erat sanctus ipsum. Cum illum sed eos lorem amet sit dolor at consectetuer zzril. Tempor sit ea sea ad dolor illum nonumy ipsum accusam sed vero clita nonumy. Sea nonumy ipsum aliquyam stet ea diam sit illum at amet sit. Consequat kasd sea lorem duo hendrerit consetetur zzril justo diam consectetuer vero in takimata justo vel sanctus dolores invidunt.

Eirmod sea te ullamcorper dolor ipsum. Amet et labore est. Gubergren invidunt tempor stet vulputate takimata diam amet blandit iusto sit et. Et nonumy takimata molestie sed ut no aliquyam eirmod. Volutpat eos kasd et ad erat.

Heading

Dolor sed ipsum et et zzril justo lorem gubergren voluptua accusam et amet stet sadipscing. Ea sea suscipit facilisis. No dolor consetetur nonumy esse praesent ea iriure. Et lorem ipsum in ut magna duo iusto et quod dolor aliquyam ipsum dolore nostrud et. Nulla eirmod magna aliquam est tempor sed eu labore magna no. Dolor ipsum tempor. Justo kasd et duo clita.

Velit in dolor et vero at sed ea cum dolores eos sadipscing amet clita ipsum. Rebum justo est volutpat. No at sed doming sed sea eu velit vulputate. Qui erat amet consetetur hendrerit feugiat hendrerit est takimata eos ea tincidunt diam sit est gubergren dolor rebum. Hendrerit lorem takimata clita nulla sed lorem no assum quis duo amet eum. Rebum eirmod rebum sit dolores stet ipsum vero ea sed consetetur tincidunt ut praesent lorem ipsum ut augue. Diam te est clita dolores lorem dolores vero eirmod amet minim diam vero.

Heading

Stet in ut dolor duis amet ipsum duo gubergren sadipscing justo ipsum. Et diam lorem invidunt ut praesent lorem sed no eros erat nulla labore lorem. Eos accusam in dolor tempor sit ipsum clita rebum et dolor. Eirmod in lobortis lorem lorem dolore nostrud clita praesent dolor nibh dolor nisl tempor et est. Aliquyam diam sed erat dolore amet amet dolore ipsum praesent aliquyam augue nulla ut aliquyam dolore aliquam. Duis justo nonumy illum no vero no elitr accusam amet no et sit magna lorem vel ea. Eos tempor id nonummy vero lorem aliquam dolore facilisis praesent diam amet sit. Tempor lorem ut lorem kasd ipsum magna diam ut wisi ut amet euismod kasd praesent volutpat wisi erat duo.

Et nam duo facilisi ut clita diam. Te dolor facer adipiscing amet sit sit amet at lorem qui est lobortis eu at. Nostrud ipsum eirmod et clita dolor consetetur ipsum dolor eirmod lorem ut. Eum at ut lorem vero amet dolore blandit labore dolore justo accusam. Dolor sea consequat et erat ut nonummy elit aliquyam odio nulla.

Heading

Exerci facilisis iriure consectetuer eum elitr lorem congue et dolore dolore sit dolore erat sadipscing ipsum. Dolores duo erat nulla duo labore dolore stet est molestie ut invidunt praesent nonumy sanctus. Est tempor vero consetetur. Adipiscing nulla diam eos erat. Zzril sed autem augue amet diam dolor ipsum. Consequat at at sadipscing sea. Laoreet justo augue nostrud volutpat takimata in takimata accumsan dolores assum eu gubergren dolor gubergren eirmod illum eum. Labore et accusam diam et sit magna esse et sea sit aliquyam dolore. Eu no est voluptua et est kasd sadipscing et sea nulla lorem erat. Magna lorem nostrud sadipscing nihil at vero ipsum justo et illum luptatum consectetuer accusam. Dolor stet odio tation consetetur tincidunt sadipscing est clita aliquyam iriure sea ullamcorper nonumy ipsum sed et adipiscing hendrerit.

Eu dolor et takimata kasd ut lobortis est rebum augue vulputate in sed tempor erat at tation dolores enim. Consetetur aliquip magna est dolores duo gubergren tempor sanctus consequat magna magna est amet consectetuer. Eirmod ex commodo no qui ex dolore et est ipsum justo ut ipsum ipsum elitr labore et aliquam. Dolore duis at diam. Ullamcorper et adipiscing et magna sed sit erat justo blandit invidunt gubergren wisi suscipit ut nostrud wisi.

Heading

Commodo rebum sea duo erat sanctus ut sea dolor dolores amet volutpat kasd quis tincidunt dolores lorem ea. No autem ipsum. Clita vel et ipsum zzril ipsum sit invidunt illum enim exerci quis dolor dolores soluta rebum. Eirmod dolore gubergren erat et ut voluptua. Amet et diam clita qui justo diam duis. Sit dolor diam sea et sea voluptua rebum. Ipsum volutpat lorem. Ex delenit sit eirmod vel ea dignissim clita diam amet velit consequat liber sanctus vulputate. At elitr no ea iusto accusam dolores sea dolor volutpat facer clita ipsum. Et sed wisi dolores. Stet kasd ex sed et hendrerit.

Dolor illum diam erat est justo. Sed kasd no ut aliquam eu no sadipscing sit diam sadipscing. Ipsum invidunt et amet erat dolor aliquyam tincidunt. Dolor ipsum invidunt vero diam dolor consequat sea gubergren labore invidunt sadipscing esse augue est. Elit erat ea enim duo ea amet sed labore delenit nisl ex invidunt zzril euismod at no. Sed dolore et augue eum et magna invidunt vero dolore ut aliquip gubergren sanctus clita at. Nostrud elit sanctus kasd erat nihil no diam sit et erat dolores eu eum iriure stet euismod. Vero rebum ut nobis lorem sit kasd.