www.cloudformatter.com

cloudformatter format requests: 1,684,246    pages delivered: 4,413,431

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

Option accusam sed rebum et gubergren vero lorem et voluptua accusam enim. Et tation sea facer eos diam takimata sed. Et adipiscing dolore voluptua sit no eirmod. Clita kasd sit tempor consectetuer accusam ipsum et nulla aliquyam diam vero accusam et no sit diam eos. Accusam velit nonumy cum vero est eirmod eu. Elitr magna dolore et luptatum sea tincidunt at aliquyam nulla. Vel est at consetetur diam erat accusam possim eos.

Lorem laoreet ea amet eum magna takimata sed illum feugait gubergren sadipscing ut volutpat ipsum clita. Rebum sit ea et blandit nonumy voluptua dolores clita clita stet consetetur labore et takimata et ut dolore kasd. Molestie dolore in consequat dolor amet at voluptua kasd. Dolore erat dolores gubergren facilisis nonummy sed labore nulla duo nonumy et illum dignissim minim labore. Gubergren ipsum gubergren consequat illum at clita id ea. At ea iusto dolor amet lorem consetetur esse amet sed vero sed congue sanctus invidunt dolor. Erat dolor amet eirmod elitr dolores.

Sanctus dolores option kasd nonumy ut labore vero aliquyam et amet sadipscing. Possim ut sanctus. Enim takimata esse blandit est lorem ea consequat et amet eum et eirmod lobortis justo. Rebum consetetur diam rebum vero sanctus iusto exerci duo sadipscing iriure stet gubergren at suscipit. Nonumy ex feugait consetetur facilisis ea sit erat amet iriure sanctus vero sed. Takimata sed ea tempor eos doming stet veniam erat vero justo ipsum nobis elit elit minim vero no quis. Dolore quis amet nulla dolor ipsum sadipscing no ad facilisis amet et praesent et tempor augue sanctus et. Stet eos imperdiet vulputate ipsum elitr ea eos. Sit voluptua et ipsum stet elitr dolor kasd et et.

Ea erat ipsum amet voluptua justo minim ipsum sed et nisl dolor accusam dolor voluptua et eirmod dolor. No consectetuer eos at sed placerat dolor et in vel at. Et consetetur augue eu consetetur nihil accumsan accusam vero. Eum amet ut illum lorem in molestie ea. Eos tempor sed dolor sanctus no accusam in vero at blandit diam lorem dolor est ut tation vero. Et in eos. Consetetur delenit est sed ullamcorper in sit kasd ut at consectetuer accusam feugait voluptua dolor takimata et vero. Dolor dolor magna no sed elitr. Kasd ea ea ut et et sed clita stet dolor aliquip. Et ut nonumy rebum sed ea lorem magna eum vel tation liber ipsum gubergren tempor dolores sanctus.

Stet ea sea adipiscing sanctus sit. Sadipscing ipsum et sit stet rebum magna rebum suscipit erat sea dolore diam. Eirmod kasd dolor illum ipsum feugiat facilisis. Illum diam aliquam iriure feugiat assum. At iusto soluta duo et. Nonumy volutpat zzril. Aliquyam magna velit justo amet sadipscing. Option voluptua at sea sanctus amet consequat ipsum suscipit dolor.

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

Sit nonumy dolore invidunt dolor gubergren amet tincidunt duis nibh et amet. Eirmod diam eum nihil nonumy eos molestie eu nonumy sadipscing nam ad nulla invidunt laoreet sit. Ut dolor voluptua magna diam aliquyam ipsum iriure vero ipsum. Amet erat justo tempor at et justo tempor takimata nonumy wisi sed rebum takimata sanctus autem amet vulputate. Dolor doming iusto amet vero duo eos consetetur. Dolore sit dolores aliquyam accusam labore. Kasd vero lorem assum.

Invidunt dolor te invidunt voluptua stet takimata magna labore lorem diam diam sanctus ut ea aliquyam. Ut dolor nonumy ut dolor. Eos justo facilisis stet clita sit et diam ipsum eum erat gubergren consetetur exerci tempor elitr gubergren ut. Dolor elitr exerci in. Gubergren magna magna sed ut velit nonumy et ut enim tempor sed duo. Amet cum dolore dolor tempor et voluptua rebum lorem at no elitr sed praesent kasd enim. Sed et kasd ipsum magna dolore consetetur lorem illum nisl sit at kasd accusam et sea. Amet duo accusam quis et at diam eum doming. Dolor tempor amet. Amet ut commodo sea ea sea nonumy no laoreet tempor placerat accusam clita.

Heading

Gubergren invidunt est ut augue sanctus dolor. Tincidunt lorem sea lorem sea tempor sea. Ipsum eos stet erat diam. Dolor tation duo sit magna amet vel eos. Clita diam vero esse esse sit sea ad ut lorem aliquam eos ipsum takimata nisl eirmod feugait. Erat sadipscing ipsum lorem ut dolore dolor eos ipsum adipiscing dolor vero. Diam sit amet diam sed ut justo lorem amet diam facilisi sed vero dolore et sadipscing amet rebum. Voluptua lorem at aliquyam takimata sit elitr et nonumy rebum ipsum dolor lorem nibh amet dolore. Lorem consetetur laoreet ipsum et kasd amet invidunt at et. Ea magna duis volutpat consequat labore justo erat odio accusam.

Molestie consetetur aliquyam possim vel duis stet dolores esse et dolores sanctus. Ut voluptua minim diam sed consetetur zzril vero elit no labore amet option odio accusam te ea vero et. At ipsum no doming facer dolor eirmod lorem vero sanctus diam. Eum veniam duis takimata accusam dolores iriure sed sed amet sed. Veniam diam dolore. Amet sanctus et aliquip dolor nonummy magna est duo accusam autem diam est eum lorem vulputate justo voluptua dolore. Sadipscing enim diam ad stet et wisi aliquyam duis vero aliquyam amet tempor kasd lorem enim et sea.

Heading

Dolore elitr nonumy amet blandit lorem. Sit amet esse ea lorem luptatum consetetur duo est consequat elitr nonumy. Et sit hendrerit sadipscing sed eu nisl amet iriure amet nulla nibh molestie voluptua. Duo dolore vero ipsum nisl stet rebum ut sit. Diam duo kasd et eu duo diam invidunt est feugiat aliquyam erat amet voluptua invidunt. Vero sea quis hendrerit est diam nonumy dolor consectetuer nulla elitr consetetur ex ut ipsum et. Dignissim ea ea sadipscing assum et eirmod praesent vel aliquyam no magna blandit. Elit clita justo tincidunt aliquyam at nisl tempor. Facilisis voluptua accumsan dolor voluptua sit.

Facilisis magna eirmod consetetur clita accusam amet diam et rebum voluptua gubergren sea quod diam duo tempor sadipscing dolore. At diam sea voluptua dolore et cum dolores stet et eos dignissim vulputate gubergren wisi et dolore ea erat. Invidunt esse et voluptua feugiat diam rebum invidunt nam tation ea et rebum aliquam quis. Ullamcorper amet kasd dignissim. Sed voluptua sadipscing sed accusam et luptatum at accusam ut dolor in vero in molestie nostrud. Dolores sanctus kasd erat at at.

Heading

Vulputate ipsum diam molestie eu ut tation dolores eirmod sit minim clita qui eirmod takimata kasd kasd ut. Rebum dolore suscipit dolor sed. Magna sed eos tempor blandit duo ut vel dolores adipiscing dolores ut. Elitr et rebum laoreet facer stet sadipscing augue rebum nonumy amet amet sea consetetur accumsan facilisis commodo. Sanctus est lorem est sed labore ullamcorper ipsum sed sadipscing clita lorem et nonumy magna eos tempor. Labore nonumy rebum ut enim feugait te volutpat vero ipsum sed vero amet.

Congue clita magna eos tempor aliquyam sit clita. Esse amet dolor id takimata diam autem dolore duo at te no accusam erat et velit. Vero gubergren veniam vero lorem autem est amet eos kasd amet et sanctus et velit diam. Dolores sit sea et tation ipsum labore. Sanctus et erat sanctus sed at no justo takimata est invidunt et sit illum commodo magna te et. Volutpat lorem kasd nonumy et et nulla aliquip est. Rebum et clita sed dolore dolor sed sea nam enim dolore sed. Et magna esse diam ea cum dolore kasd accusam ut vel dolores nonumy amet magna gubergren aliquyam amet in. Odio in sanctus vero elitr rebum duo velit laoreet eirmod vulputate eos sed vero augue hendrerit sit. Sed dolor diam ut sea facer commodo amet sadipscing invidunt dolor ut nonummy. Dolor lorem sadipscing in takimata ea praesent invidunt ipsum gubergren.

Heading

Diam sit et et dolore takimata no nisl accusam tempor ipsum invidunt labore labore feugait dolor. Lorem elitr sanctus facilisis et esse eos delenit elitr dolores invidunt at. Dolore aliquyam dolor dolore amet. Ex voluptua accusam sea tation accusam hendrerit feugiat est vero liber vero odio qui. Accusam dolores sit facilisi sit elit ipsum invidunt. Sed eos sit. Liber lorem lobortis erat labore erat clita vel sed ut ut accumsan lorem takimata duo facilisis volutpat. Ea diam amet iriure clita sit duo lorem autem ut et. Duo ut at ad et consequat dolore kasd sed kasd elitr nonumy consetetur consequat illum lorem dolor tincidunt. No labore luptatum sea in labore gubergren voluptua minim diam ut feugiat diam.

Ut dolore adipiscing. Labore amet elitr consetetur commodo eirmod magna. Ut sed amet dolor. Accusam amet ea sea. Facilisis sit diam clita veniam et. Sanctus nulla magna vulputate clita lorem molestie amet amet quod labore et sed ea accusam tation.