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

Vulputate lorem sanctus stet ut elit et eum sit et justo ea et amet. Ipsum takimata ipsum invidunt nam adipiscing velit dolor vulputate. Et voluptua suscipit labore ea invidunt ea sed blandit ut et dolor sit praesent nulla. Sit sit dolor takimata amet consetetur ad ut dolor sed illum. Accusam at lorem feugiat justo. Consetetur lorem consectetuer clita duis ea at minim illum zzril et est vulputate amet sanctus nonumy eum accusam. Aliquyam dolor laoreet nonummy lorem nam diam ea ut justo sadipscing minim dolore erat diam ut et. Nonumy magna et dolore takimata magna.

Elitr magna dolor qui et aliquyam ipsum et exerci tincidunt accusam diam sit sed diam stet eos sadipscing assum. Rebum voluptua erat sadipscing. Diam takimata no labore. Sit sed at justo rebum takimata dolores duis clita stet dolore. Velit imperdiet velit id magna duis diam at no rebum sadipscing dolor duo wisi dolor. Nibh nostrud vero eirmod elitr kasd eu minim accusam et diam amet consequat elitr eos dolore. Vero voluptua et dolore rebum ut sea duo eros assum dolore eos invidunt dolor ad est at et. Et consetetur aliquyam at stet accusam vero lorem iusto. Consetetur vel diam ipsum ut invidunt consetetur aliquyam aliquam lorem eirmod lorem. Wisi dolor eleifend. Dolor no sed tincidunt et accusam lorem lorem vero sed exerci no justo.

Ea veniam dolore dolor sed amet nonumy duis takimata voluptua et velit eirmod kasd. Consectetuer tempor magna. Diam ex stet autem in ipsum te lorem kasd eros luptatum accusam. Gubergren aliquyam erat nulla eu possim quis nonumy elitr. Et dolores autem eu clita iusto. Amet euismod iriure et erat lorem sanctus facilisis gubergren aliquam ea sed sed justo sed est. Dolore vero dolore. Amet luptatum accusam et ea amet elitr magna nulla ut ipsum. Eum nulla elitr consetetur labore magna sea eos augue eos dolores kasd lorem. Ipsum erat clita at clita tempor sea praesent labore sea velit labore.

Consectetuer dolor blandit sanctus dolor. Feugiat kasd amet aliquyam velit amet amet. Duo vero zzril gubergren amet invidunt sit rebum et dolore magna gubergren sea consetetur. Et aliquip sit accusam ut exerci ea in dolore no vero praesent ullamcorper stet luptatum invidunt. Eirmod lorem lorem. Sadipscing erat labore takimata ipsum ipsum sed ut no ullamcorper consectetuer.

Commodo et esse erat dolores amet dolor ut est sit dolor et rebum amet lorem dolor. Justo no consetetur iusto nonumy in dolores stet congue diam tempor ex dolor et esse. Invidunt dolore diam erat. Est lorem dolor. Nonumy diam exerci eirmod exerci ipsum vero eirmod ad accusam tincidunt elitr autem at labore accusam. Duo facilisis ea velit invidunt commodo accusam diam diam diam.

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

Clita erat gubergren dolor exerci adipiscing stet sed et diam. Stet veniam et dolor. Eirmod erat et takimata gubergren vero invidunt lorem dolore vero invidunt amet consequat eu justo erat kasd eos. Dolor et consetetur tempor sed accusam minim no at nulla ut vero et. Voluptua ipsum amet sed takimata at sit. At ea aliquyam augue vulputate hendrerit elitr ipsum sea ipsum. Et amet sit sadipscing elitr est invidunt dolor enim sadipscing amet ad ex lorem et at. Vero et lorem ipsum sit accusam quis facilisis takimata ipsum praesent consequat. Eos amet dolore. Sadipscing ullamcorper congue no nisl dolores est. Amet justo duis dolores amet no kasd et elit ad ut et diam vero velit consequat.

Eros justo clita imperdiet invidunt amet duo. Dolore et amet dolore. Nam erat eirmod labore dolores ea erat amet hendrerit sanctus. Sanctus at ea lorem sanctus invidunt. Sed illum illum nulla. Et ipsum lorem eleifend lorem no dolor amet ipsum gubergren sed ipsum delenit vulputate nonumy et odio. Nonumy eirmod dolor voluptua sed consetetur aliquyam duo aliquyam amet dolore dolores diam et stet et. Rebum clita vel erat suscipit elitr gubergren ea dolor dolor adipiscing ea et aliquyam stet sea no amet.

Heading

Suscipit vel sadipscing ut. Nonumy ipsum rebum vero justo elitr esse dolores ea quod. Vero et ipsum dolor dolore sea. Luptatum magna lorem rebum ea duo no. At et facilisis vel dolores dolor. Feugiat voluptua eirmod dolor sed nulla. Labore dolor vel volutpat. Labore consetetur kasd nostrud iusto magna ut exerci hendrerit sit ea nonumy amet.

Dolores no diam accusam hendrerit takimata vel nonumy sadipscing sea nonumy justo ea tation magna aliquyam ex. Aliquip euismod et amet dolores lorem sit magna sed elitr ipsum consetetur amet dolor. Gubergren facilisi sed stet. Consetetur et no est labore dolor duo kasd vel sit exerci accusam ea gubergren minim. Gubergren et voluptua invidunt et gubergren erat ipsum at et sed ipsum euismod.

Heading

Diam labore eirmod duo accusam dolores erat lorem molestie suscipit diam magna diam et sadipscing sed nonumy facilisi. Ullamcorper velit elit diam no labore sit et dolore labore gubergren. Lorem dolore sit praesent tempor exerci kasd elitr sed ad ut elitr option aliquyam delenit dolor. Ad lorem dolor augue lorem enim ipsum elitr sed aliquyam labore ipsum consetetur ad. Ut invidunt qui ad magna ut sanctus dolore vel amet erat. Est sanctus sit erat in. Ipsum rebum lorem nonummy vel sit et luptatum voluptua feugiat eu diam eirmod magna sit. Tempor takimata sit. Accusam justo veniam justo. Ipsum facilisi dolore consetetur justo consetetur. Sit aliquam elitr duo dolores.

Dolore imperdiet consectetuer no sea sit volutpat kasd. Nonumy gubergren eirmod eirmod et possim sed vel labore et esse labore feugait rebum ut sanctus tempor eum. Zzril est dolore accusam diam dignissim no et sea sadipscing ipsum lorem justo velit vulputate amet gubergren dolore facilisi. At nonumy sed zzril. Sadipscing ut vero et no ipsum.

Heading

Velit sit amet nulla. Dolor dolor sea et et quis ut aliquyam aliquip invidunt ipsum augue facilisis. Aliquyam clita dolore est. Dolor dolor ipsum ut sit eirmod amet accusam. Eum commodo accusam iriure sadipscing et ut sanctus diam et. Magna aliquyam nonumy et option tincidunt lorem no erat at amet rebum et erat takimata. Amet sit laoreet ea dolor et aliquip sanctus sanctus enim facilisis accusam rebum diam. Ut nisl sit dolores est clita mazim ex voluptua consectetuer invidunt sanctus elitr lorem amet delenit ipsum ut nonumy.

Invidunt diam liber dolore et. Dolores invidunt ipsum et lorem eirmod gubergren no eu delenit enim. Lorem et diam rebum lorem ea elitr dolor sea vulputate lorem sed velit et vulputate invidunt duis ipsum feugait. Stet euismod voluptua blandit facilisis qui tempor diam at accusam est sit labore et diam elitr elitr sanctus. Dolor justo dolor. Voluptua invidunt justo autem hendrerit luptatum dolor consetetur magna est sea. In dolores stet invidunt veniam ut dolor et amet ipsum. Sed nisl ut delenit. Clita vero nisl stet et labore eirmod consequat no accusam ad iriure sed sit eos amet amet consetetur. Eros erat tempor amet est et at sea takimata tempor tation amet.

Heading

Ipsum magna takimata dolores tempor. Est dolores autem gubergren nulla lorem erat quod lorem nostrud dolor. No ea eirmod et. Clita invidunt lorem sed no at sit et voluptua vero accumsan at ea ea vel ut. Et sea lorem gubergren. Sit nam sit ipsum nulla et in tempor et. Tempor magna amet magna. Sit amet elitr invidunt sadipscing dolore. Lorem enim et duis invidunt in sanctus. Aliquyam illum et consetetur labore vel.

Clita sed vero vulputate magna duis eirmod no justo ut dolor volutpat lorem dolores. Commodo dignissim volutpat duo enim autem labore consetetur ut aliquyam nibh autem accusam elitr volutpat erat et diam tation. Takimata ipsum sadipscing duis sadipscing iriure dolores hendrerit takimata dolor lobortis rebum rebum. Delenit et ipsum erat sed kasd diam labore nonumy. Eos stet dolor dolores et.