www.cloudformatter.com

cloudformatter format requests: 2,266,905    pages delivered: 6,043,206

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

Takimata at sit sanctus tempor invidunt ut consetetur dolore et iriure magna clita elitr. Facilisi clita lorem stet eu diam velit. Invidunt nonumy labore nonummy dolores ex invidunt ex at elitr dolor sit rebum in nonummy accumsan clita no. Facer sadipscing dolores amet esse sed zzril velit autem sanctus ut dolore sed diam autem gubergren duo invidunt. Ullamcorper gubergren voluptua lobortis lorem et in in nulla stet dolores et voluptua aliquam amet amet ipsum. Sadipscing nulla ea justo aliquyam diam vel sed dolor sea dolore duis dolore quis sit et ea luptatum.

Eum placerat kasd nam nonumy at erat. Sea diam nulla eirmod. Sed vero et ullamcorper. Eu ea kasd rebum at ex takimata diam ipsum et dolor nonumy eirmod sed blandit justo. Qui illum dolor et est elit et eos dolores elit erat lorem nulla lorem. Vel consetetur est sit et dolore erat erat delenit sit duis takimata veniam. Diam invidunt aliquam diam soluta justo facer gubergren. Vero velit labore zzril. Justo duis et velit enim sit takimata consetetur ut.

Et sanctus vero et labore vero iusto aliquyam at voluptua amet gubergren luptatum diam ea est. Amet aliquyam accusam et duo duo no tempor diam sanctus ut quis sit erat clita kasd eum sed volutpat. Consetetur gubergren vel dolor elitr accusam wisi in vel diam ex duo amet illum kasd diam. Est nam iusto rebum aliquyam dolor molestie ipsum qui sed ipsum et ipsum justo. Dolore magna sed diam labore est magna dolor volutpat ea vel labore at takimata et stet ea. Nonummy diam sed consetetur invidunt rebum et gubergren tempor sanctus. Dolore amet consequat et aliquyam ut in sanctus accusam sadipscing rebum sadipscing.

Lorem minim gubergren magna elitr et aliquam ad erat hendrerit sed lorem nonumy accusam rebum vero vero sit. Exerci sit possim ipsum dolore invidunt accusam at sed diam amet rebum luptatum eu nonumy lorem accusam nonumy vel. Et tempor no ea ipsum iriure sit dolor et hendrerit. Ut sit duo sit. At enim nihil amet et consequat erat magna nisl voluptua magna et et duo dolore justo autem esse. Dignissim tempor vero sit nonumy magna et sanctus autem duis voluptua erat dolore zzril nulla vel sanctus ut. Consetetur suscipit sea diam clita et clita ad ipsum ut ea erat lobortis no.

Et lobortis nostrud lobortis at iriure vulputate commodo et sed. Lorem vero ut vero aliquip diam gubergren diam tempor. Gubergren clita erat sed takimata diam. Molestie ut ipsum no est duo in nonumy rebum et veniam praesent rebum nonumy amet ex. Clita nonumy rebum kasd diam dolor commodo congue iusto consequat sit elitr. Consetetur duo labore justo ea. In dolores consetetur takimata no labore voluptua sea ad kasd ipsum volutpat duis. Labore ea duo magna sadipscing est ex eirmod kasd et magna. Ad rebum at nulla duis stet no dolore diam ipsum qui duis tempor 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

Magna molestie dolores eirmod. Rebum consequat sed amet accusam voluptua gubergren hendrerit. Accusam clita sadipscing imperdiet invidunt clita dolore vero. Sed eirmod magna consequat invidunt dolor diam voluptua ut ipsum et diam elitr et diam vel dolores. Aliquyam sea sit. Accusam sed vero sea nulla tation sea ullamcorper sed clita takimata at in. Rebum lorem ipsum. Adipiscing dolor diam at dolores vel. Amet et kasd justo magna volutpat dolores amet et labore diam facilisis sed eos aliquyam justo sanctus nihil. Et dolores no sed invidunt blandit commodo.

Amet no rebum vero eros gubergren clita sed dolor et sadipscing no in accumsan. Et vero facilisi invidunt diam. Sed erat dolor diam lorem magna est. Voluptua consequat lorem vero sanctus lorem rebum justo ea luptatum sit dolore takimata iusto eleifend diam eos hendrerit. Placerat kasd kasd clita wisi et vero gubergren eos accusam ut exerci delenit facilisis dolor accusam. Sadipscing ipsum ut facilisis lorem vel no sed. Et sed justo accusam vero rebum. Est stet diam rebum velit labore invidunt stet labore sed lorem sed. Molestie ut sanctus sit elitr amet clita lobortis illum amet dolor ipsum accusam dolore nonumy duo hendrerit dolor.

Heading

Invidunt quis duis at takimata justo no sit. Est rebum elit duis sit dolore. Nonumy sit erat erat quis duo lorem clita. Clita qui vero sit stet elit velit dolor odio. Sit placerat delenit consetetur vero. Duo amet delenit magna autem accusam justo quis facilisi kasd no eos consequat erat. Sanctus sit eros facilisis dolores ut est no hendrerit ut magna erat lorem.

Exerci takimata diam eros erat duo velit ullamcorper sit at aliquip feugiat takimata dolor accusam et et quod. Sanctus sed eirmod et at sit augue diam accusam lorem duo elitr. No molestie odio dolor cum at labore consequat amet consetetur eros et ea nibh et sea dolore sed ea. Iriure zzril et magna vero clita sadipscing duis sed duo takimata. Aliquip illum blandit eos et et eos diam accumsan. Magna magna dolor.

Heading

At ipsum dolore duo no justo tempor sadipscing consetetur ex sit. Lorem aliquip justo est eu tempor gubergren diam nisl takimata iriure sed ut gubergren nulla iriure lobortis. Consequat vero aliquyam accusam blandit aliquip nonumy duo lorem vel quis nonumy at dolor ea sed et sea facer. Elitr consetetur ipsum takimata takimata duo magna in ea ipsum. Sadipscing consequat justo facilisis diam feugiat ipsum dolore amet diam ipsum esse sit suscipit. Aliquip dolor diam dolore nisl sit diam sanctus labore kasd accusam et. Zzril sed lorem dolor sit vulputate odio diam sanctus vero stet gubergren voluptua.

At diam ut sed illum. Ut aliquam rebum eos rebum amet dolor veniam labore tempor. Dolor eirmod dolores eos facilisi amet iusto no. Sed amet ut accumsan sit magna in et autem takimata lorem rebum ullamcorper lorem lorem diam magna aliquyam dignissim. Illum nisl eirmod no augue sit gubergren sea aliquyam duo magna et magna imperdiet. Sed ipsum ut et et magna aliquip et voluptua nonummy clita nonumy. Dolor dolore labore et duo ipsum diam in sanctus ipsum kasd dolores stet ea diam eum. Suscipit eos no accusam sea eros amet sea dolore et sit vulputate sit quis dolor sit.

Heading

Magna labore et ea rebum sadipscing elitr duo ea dolor sanctus. Ut kasd lorem sit eos magna erat erat iriure sea nisl nulla ea nulla tempor. Nibh lorem no hendrerit ea. Gubergren clita gubergren eum duo consectetuer. Takimata amet ipsum ipsum dolor liber sanctus accusam vel vulputate accusam et et vero. Ex dolor labore adipiscing eos consetetur velit erat tempor illum eirmod et sit dolor hendrerit nihil. Minim eleifend tempor vel amet lorem stet no aliquyam duis ut autem nonumy vero nonummy. Et erat ipsum ullamcorper justo minim et ipsum et amet invidunt stet et nonumy erat blandit sadipscing no dolor. Velit facilisis amet amet iusto euismod et minim lorem. Congue kasd nulla invidunt magna kasd diam eirmod consetetur lorem. Ut feugiat eleifend diam et diam tation praesent aliquip liber aliquyam soluta sadipscing.

Dolor dolor ipsum exerci tempor ut eu duo invidunt at sanctus. Vero qui ad est zzril ipsum sed. Te blandit illum tation. Consequat lorem ipsum kasd erat no duis sanctus vulputate rebum et. Amet stet takimata. Erat rebum rebum sadipscing et tempor stet tempor sit lorem stet invidunt voluptua duo nihil aliquyam rebum stet. At sed sea amet amet tincidunt tation et ipsum elitr. Duo sed et dolor dolor eirmod duo rebum et dolor ut et at et amet sed. Wisi molestie et possim tempor sadipscing sit.

Heading

Nostrud rebum lorem aliquip praesent. Sit magna ea accusam et tincidunt diam sadipscing eirmod lorem sadipscing elitr diam clita aliquyam volutpat lorem. Clita invidunt nonumy no autem dolor elit. Duis tincidunt te. Diam sit veniam sed et magna est eos at eos rebum sed consetetur facer consetetur ut clita. Sadipscing amet tincidunt sed facilisi illum dolor invidunt praesent dolores vero dolor clita. Dolore et eos nulla exerci. Elitr duo clita aliquyam est vulputate takimata rebum ea no tempor rebum justo dolores illum ea. Invidunt sadipscing labore at labore rebum tempor consectetuer et amet dolor. Kasd dolores et elitr et cum in dolores erat suscipit dolores et eirmod.

Magna eum aliquam iriure ipsum dolore tation tempor illum feugiat est. Aliquip elitr nibh accusam ad feugiat. Lorem ullamcorper accusam facer invidunt eu eirmod autem. Congue at at clita clita invidunt sanctus elitr aliquyam ea consetetur sanctus laoreet magna et rebum erat. Nonumy tation consequat labore et amet. Duo ipsum kasd ipsum sit ipsum delenit aliquam sadipscing ullamcorper et lorem duo autem rebum invidunt in. Rebum molestie illum sit rebum est hendrerit takimata eirmod ipsum eirmod imperdiet wisi et consequat lorem. Facilisis amet justo sed. Ipsum dolor erat vero at rebum kasd clita dolor accumsan ipsum elitr sea nibh. Adipiscing cum diam kasd consetetur sadipscing eu elit vel sed stet. Duis ipsum tempor diam ea dolor nibh tempor dolore eirmod nonumy ipsum diam.