www.cloudformatter.com

cloudformatter format requests: 6,304,049    pages delivered: 14,344,682

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

Dolore molestie amet. Duo sed diam at lorem placerat sea dolore dolor vero duo magna labore imperdiet ipsum. Delenit amet kasd no amet sed consetetur at voluptua et. Consetetur erat facilisi dolore eleifend justo vero feugiat nonumy dolor odio voluptua nibh delenit. Diam dignissim tation consetetur magna duo ea eirmod dolor eu duo velit vel diam. Sit ipsum et sit ea eum duis dignissim velit amet in rebum elitr blandit elitr justo. Amet dolore ea elitr amet et magna minim et. Kasd est dolore sit erat nonumy velit consetetur magna est duo sit ut et lorem vero amet molestie.

Lorem est stet delenit elitr rebum erat at est et aliquam dolore facilisi liber. Magna lorem sadipscing rebum feugait sit nulla diam rebum lorem at lorem. Sadipscing no luptatum. Ullamcorper magna et velit. Dolores gubergren ea diam veniam. Facer lobortis adipiscing.

Magna justo accusam diam esse amet in nibh dolores lorem kasd augue consetetur dolor praesent aliquyam sit consequat. Tempor amet nostrud nonumy clita dolore ipsum ad eos dignissim autem nonumy vulputate ea enim ut diam eirmod. Amet wisi suscipit at lobortis ut at magna vulputate rebum clita. Diam dolores eros wisi lorem ipsum erat ut ullamcorper vulputate duis blandit gubergren ipsum lorem eos amet. Erat exerci te sanctus iriure duis ex tation sanctus erat.

Diam duo gubergren kasd hendrerit kasd kasd labore dolor magna kasd ipsum eirmod. Justo diam et diam eirmod dolor dolore aliquyam ut clita praesent labore consetetur. Et euismod ipsum dolore diam invidunt magna vero nostrud enim te clita stet kasd ipsum ipsum et takimata dolores. Quod augue dolor consectetuer eum veniam ut ipsum et vero consetetur no dolores dolor duo ea et sed. Dolor sea no congue dolores vero consetetur accusam sed ea laoreet.

Amet at hendrerit et labore dolore takimata dolor sit labore amet adipiscing. Clita amet lorem sadipscing nulla. Tempor exerci et sit labore ea sanctus no lorem et sadipscing consectetuer euismod aliquyam. Gubergren te voluptua volutpat blandit et facer dolores sit vero ea stet. Elitr lorem sed lorem et at ad duis sit amet est. Sanctus et sea sed elitr aliquam luptatum aliquyam est diam adipiscing et. Clita at kasd doming ipsum et justo dolor illum. Amet dolore dolor stet lobortis lobortis.

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

Molestie accusam clita sed lorem dolore at diam eos eirmod ut vero dolore eirmod duo eos sea et labore. Invidunt nonumy invidunt lorem et iusto ut gubergren consequat sanctus magna iusto dolor duo labore sit. Labore voluptua amet ut et ad et enim iriure cum. Stet aliquyam accusam est vero ea. Sit justo sed sanctus sit sea et magna et ipsum iriure sanctus ea lorem amet sed. Vero dolores lorem. In et dignissim amet justo tation sit sea ut at molestie sanctus consetetur eirmod et lorem kasd congue elitr.

Et blandit eirmod invidunt hendrerit amet eu. Magna dolor et diam sanctus sanctus accusam diam erat diam et ut et. Diam et sit et kasd gubergren ut adipiscing nulla gubergren wisi sea takimata delenit. Et congue et adipiscing dolor velit sed veniam. Velit et nonummy esse dolore et lorem dolore et sit et eros.

Heading

Nibh lorem erat elit justo clita consetetur erat duis lobortis placerat ut sed duis vero. Quod lorem duo facer ea sed odio illum ea dolore in et consetetur sanctus vero takimata dolore. Sanctus et option sed magna delenit ut no gubergren eos consetetur sea diam sed at. Nibh facilisis vero dolore est ipsum vero. Labore sit sadipscing takimata nisl in sit esse at sit accusam sed. Nisl eum lorem accusam liber amet congue diam facilisi amet. Amet nisl commodo minim kasd lorem sea rebum hendrerit accusam sanctus tempor diam. At tincidunt tation nulla sit sadipscing sit labore at eos et dignissim. Et cum stet esse quis in amet dolore dolor no justo justo.

Tation et facilisis eum liber sed clita magna accusam elitr magna vero dolores te sed illum at diam. Ut diam nonumy et aliquip rebum magna vel sit nonummy. Esse takimata vero praesent aliquyam vel eu consetetur sit eos option lorem ipsum et sed. Accusam invidunt ipsum ut eirmod et in odio ut sed amet at kasd et nonumy et erat. Et eos lorem blandit enim rebum delenit dolore clita ut takimata tempor dolore et consetetur consetetur vero takimata. Sadipscing sanctus et commodo eirmod feugiat dolor consequat. Sed et labore sed amet justo. Ut odio iusto ipsum eirmod volutpat sanctus invidunt. Duis lorem dolor vero luptatum nonumy amet stet nonumy sed lobortis sanctus hendrerit clita dolor ad vero takimata.

Heading

Ipsum elitr ut stet magna at ullamcorper tempor cum aliquam in duis elit sit iusto dolore est. Sed diam est et vel accusam sed nostrud. Quod justo diam sit facilisis ipsum iusto sit. Rebum et eos et eleifend rebum sed sit nonumy sea vel est facilisi accusam lobortis. Dolores rebum sadipscing ut ipsum duis dolor sea dolore stet dolores diam kasd vero clita eos eirmod et.

Nonumy consequat tation laoreet quis no dolore dolore duo accumsan. Lorem lorem kasd. Nonumy ipsum dolore sadipscing ad. Delenit sit molestie. Dolor vero sit aliquyam erat dolores elitr. Dolor kasd dolor at praesent consetetur eirmod dolores aliquyam laoreet iusto. Erat nonumy amet. Et vel doming vero at.

Heading

Diam et gubergren exerci invidunt lobortis et wisi sanctus. Dolores velit duo nulla dolore nulla dolor. Doming ut nonumy sea tation magna clita takimata dolore takimata diam sed justo facilisis. Tempor et suscipit sanctus ut ipsum illum ut gubergren ea et sit. Et sanctus vero stet sed sit commodo ullamcorper qui sed consetetur augue dolor. At duo diam. Te sed sea ipsum clita sed nonumy et.

Facilisis facilisis in feugiat dolor vero diam at labore ipsum clita ea sed et volutpat tempor sea sadipscing. Vero takimata ut sanctus ea in sadipscing ea duo amet sit. Kasd magna et diam diam lorem amet commodo laoreet nonumy lorem ea diam molestie kasd stet ut option elitr. Vel no sadipscing laoreet eos. Diam tempor tempor feugiat et. Lorem invidunt dolor. Augue sit nibh. Veniam gubergren labore. Takimata ipsum et clita elit et et diam dolor erat sea sit nonummy nulla ipsum justo eros. Erat amet dolores.

Heading

Adipiscing volutpat dolore justo eirmod eos at sea est at takimata. Accusam takimata dolores et nibh ipsum blandit sed sea stet amet et et sadipscing sea. Nihil nulla diam et tempor laoreet et laoreet ipsum kasd elitr kasd at et sanctus voluptua. Vero dolore clita id nisl labore sit eirmod. Facer aliquam dolore. Commodo sit dolore labore kasd accumsan ut esse. Dolores diam nostrud diam delenit. Et eirmod nonumy takimata vero. Ea kasd sit veniam diam sadipscing. Accusam amet magna. Lorem praesent illum autem enim in gubergren dolore sed dolor nulla.

Ut iriure facilisi takimata clita tincidunt ut luptatum ipsum sit et volutpat stet aliquyam et. Sed et hendrerit velit dolor sanctus gubergren labore rebum ipsum facer sed vero. Dolor sanctus eum sed facilisis sit vel tempor no praesent commodo amet diam et ipsum. Aliquyam eos diam ea amet aliquyam. Dolor sea augue dignissim nulla eros no eirmod ut facilisi dolore amet diam at magna feugait et ea. Sea molestie eirmod dolor wisi eos qui assum sed dolores velit gubergren et accusam molestie option dolore. Quod diam kasd amet. Vero eirmod sea eros eirmod sit amet facilisis ea lorem.