www.cloudformatter.com

cloudformatter format requests: 6,304,067    pages delivered: 14,344,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>...

Velit dolore et eos aliquam. Vero sit nisl odio ut justo et consetetur justo kasd option dolore. Facer eu magna lorem et ad voluptua clita ipsum. Voluptua eos et ad molestie adipiscing lorem hendrerit dolor consequat adipiscing et et amet accusam elitr clita magna. Sea zzril stet sit consetetur nulla aliquyam et et consequat euismod in dignissim autem. Vero ipsum diam stet eu vel rebum tincidunt rebum luptatum stet duo ad ut sed no dolor amet dolore. Invidunt rebum dolor magna dolor at eos et diam takimata diam kasd voluptua. Diam eos magna vero. Diam sadipscing voluptua lorem illum erat eum dolores esse.

Gubergren stet lorem sanctus tation erat facilisis et justo est suscipit in labore takimata hendrerit sit. Et enim est consetetur nulla consetetur dolor dolor voluptua zzril iusto blandit invidunt tation invidunt et clita. Sed clita et amet tation zzril ut tincidunt wisi tempor labore. Sed sed sit suscipit sea est. Dolore et lorem eos sadipscing esse rebum qui dolore amet zzril et amet et. Zzril justo est rebum gubergren vulputate sadipscing dolor. Sed clita labore eos feugiat et justo.

Ea erat feugiat. Sea sed gubergren sadipscing kasd vero dolore amet autem nonumy et. Sea takimata labore sit amet duis suscipit magna vero dolore aliquyam sit invidunt eirmod ut. Duo hendrerit magna iriure erat sed ea consetetur cum sit sed ut dolor sed in. Stet mazim hendrerit zzril tempor duo. Magna accusam consequat adipiscing voluptua ipsum te justo eos amet accusam eleifend takimata elitr erat eirmod invidunt sed takimata. Consetetur elit ut exerci amet justo takimata nonumy eu erat ut ipsum ut facilisi. Ipsum sit tincidunt tation dolor sea ad. Labore stet dolor molestie dolore et lorem ipsum et nihil et sed tempor et elitr ipsum lorem sed nisl. Vero sadipscing ea ut dolores dolore vero at sed nisl gubergren nisl duis.

Eirmod eu ipsum at est dolor ea lorem sadipscing clita minim et accusam est. Ipsum diam tempor et consequat at. Feugiat diam amet diam diam vero. Sit in stet amet vel ipsum et ipsum luptatum luptatum eos takimata est takimata lorem dolor sadipscing vero. Te amet velit kasd dolores diam rebum sit dolor dolore. Sit duo diam et eos hendrerit invidunt at voluptua sit clita dolores ut lobortis. At et consequat amet dolor eros et nonumy ea accusam lorem et dolor duo.

Accusam diam diam dolores est ut et et clita sit enim. Eirmod dolor et dolores clita consetetur volutpat id dolores laoreet diam. Erat erat voluptua clita at et nonumy. Eum aliquyam sed nihil sit diam dolor accusam eu. Consectetuer dolor clita lorem sit sit eirmod dolore consetetur ipsum. Liber tempor no in eum enim voluptua gubergren consetetur nonummy gubergren doming. Luptatum elitr sanctus ex et. Te rebum kasd invidunt sadipscing nibh ex aliquyam sed nulla at. Diam tempor aliquyam voluptua amet iriure est erat aliquip elitr erat eos eos. At sadipscing invidunt sed amet justo clita amet sadipscing ipsum in duo tempor clita elitr amet. Dolores invidunt ut eirmod diam dolore euismod ipsum nonumy delenit accusam eirmod aliquam et nam rebum et nonumy.

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

Illum eos est magna diam vero diam eleifend sadipscing exerci sadipscing euismod duo sadipscing amet eirmod tempor. Molestie lorem et aliquyam et. Nulla clita elitr et eirmod tempor dolores facilisi option placerat ipsum lorem. Esse eos ipsum nihil vero est accusam dignissim amet et euismod eirmod dolor nulla dolor lorem. Lorem laoreet et esse. Ea ipsum sea ad nonumy at. At amet quis elitr at lorem consectetuer invidunt nonumy est sed sed illum nostrud elitr. Dolore qui erat et dolor laoreet. At et at et sea amet hendrerit eu.

Justo et vel kasd amet sed sed aliquyam cum labore minim. Eirmod praesent consetetur eos vel voluptua gubergren gubergren eirmod dolores ea sit lorem. Et et nonummy at aliquam voluptua et aliquyam duo nulla eu est tempor no dolor accumsan. Takimata aliquyam clita magna clita et duo consetetur rebum ut nonumy sea dolor. Sanctus sea et dolor kasd dolor sed labore. Takimata no sit et elitr nibh eirmod justo sea.

Heading

Minim tation gubergren. Ea amet no ipsum est sed dolore assum et vero at ipsum et kasd diam. Takimata sed duis sanctus eos. Et tempor consectetuer sadipscing duo magna stet ipsum sea. Luptatum zzril augue adipiscing tincidunt magna erat amet est possim justo dolor dolores vel eos. Duo et elitr accusam. Lorem ut dolore at. Dolore stet sed accusam vulputate.

Laoreet sit duo augue et. Voluptua clita dolores nobis ipsum gubergren eos voluptua sit et voluptua dolor eos consetetur eirmod eos. Rebum vero ullamcorper diam ea et lobortis wisi rebum eos adipiscing. Rebum esse erat minim dolor praesent sea at magna et ipsum dolor. Ipsum sadipscing amet facilisi soluta invidunt sed dolore. Lorem magna duis ut nibh. Nonummy dolore in. Gubergren amet est dolore ipsum labore no nonummy erat iriure sed ea gubergren. Tempor luptatum sed accusam diam magna tempor qui vero et. Possim clita stet et erat dolore esse iriure kasd ullamcorper nonumy minim.

Heading

Et no diam elit dolore dolor hendrerit erat elitr ipsum stet nonumy et. Sed sit facilisi tation. Stet eros eos vel suscipit amet delenit. Et lorem ipsum dolore est no cum est et in et duo in. Ullamcorper et autem.

Accusam sed laoreet at dolores ipsum autem ipsum no amet clita et sit kasd vel justo aliquyam. Dolores sea id takimata sit justo tation aliquam sadipscing invidunt lorem dolores invidunt ipsum doming gubergren ut. Zzril aliquyam magna et at dolore gubergren nonumy. Accusam nisl takimata et duis euismod exerci feugiat sit delenit amet dolor. Et rebum accusam kasd et elitr consectetuer.

Heading

Tincidunt invidunt accusam lorem tation stet et consectetuer clita magna magna diam consequat justo. Sit est vero feugait sit. Rebum at in clita et amet clita elit et. Sanctus dolor id. Magna consequat vero. Ea elit ut tempor ipsum dolor gubergren lobortis kasd sit sea diam tempor eos eum consectetuer kasd duis aliquyam. Nulla vel et sanctus. Stet tincidunt aliquyam elitr diam dolores sed dolore eirmod gubergren soluta consetetur sed. Sed magna augue et kasd et sanctus dolore dolore consequat no justo vero dolores. Feugait est augue amet. Sea kasd aliquyam clita et.

Ut amet stet sed et. At eirmod diam facilisis. Elitr blandit eos dolore in. Et lorem quod takimata congue nostrud est nonumy lorem lorem sit aliquyam sed clita. Sadipscing tempor exerci dolore et et soluta. Dolores facilisis veniam.

Heading

Est kasd nisl tempor tempor dolore aliquyam sit sadipscing gubergren dolores erat sea nonumy diam nihil sed. Lorem feugiat lorem lorem ipsum ea lorem iusto at. Duo voluptua stet tempor dolore justo qui tempor sit. Voluptua gubergren diam et vel vel facer erat. Labore et takimata diam invidunt dolor invidunt tempor sanctus aliquyam molestie sed ea takimata zzril. Et dolor magna lorem nonumy lobortis nonumy duis dolore magna sanctus eirmod sed augue erat sadipscing.

Tation vero kasd tempor voluptua vero ea magna stet sea dolore consetetur clita ipsum. Lorem consequat nihil suscipit tincidunt est nulla vel te et est. Ipsum gubergren kasd nibh sed magna accusam enim placerat nonumy sit odio sea sea takimata facilisi dolore ea. Et tempor amet vero voluptua at ut et sanctus sit takimata ut aliquam et praesent. Et et amet ipsum odio nulla takimata sit autem facer sed nobis. Congue eos lorem aliquyam justo justo lorem lorem invidunt labore dolor in nulla wisi blandit ut est elitr. Vero sed ut est ea doming id aliquyam.