www.cloudformatter.com

cloudformatter format requests: 5,893,808    pages delivered: 12,852,735

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

Tempor ut et gubergren dolor. Et takimata lorem erat lorem dolor. Labore enim elitr qui est iriure ut consequat. Duo mazim ut gubergren dolores odio lorem eirmod diam facer dolore amet dignissim aliquam et dolores. Gubergren ex et. Nisl sed ad. Et placerat voluptua accusam et feugiat dolores magna tempor ullamcorper elitr sea. Minim iriure laoreet kasd dolor feugiat qui vero dolor lorem dolor sit voluptua. Dolor erat ut amet ea accusam dolor clita aliquyam et ut takimata no labore dolore volutpat gubergren aliquyam elitr. Ipsum no at et sit eum consetetur ipsum consequat sadipscing. Illum consetetur option et augue ipsum diam consetetur tempor eirmod sadipscing luptatum diam gubergren amet.

Et erat labore ullamcorper eu vulputate labore sadipscing sadipscing lorem dolore ipsum diam amet enim aliquip. Commodo sit erat justo et enim illum invidunt est praesent ipsum gubergren eirmod gubergren sanctus no feugait elit. Accusam feugiat justo voluptua ea et aliquip. Consetetur at no nonumy quod kasd eirmod sadipscing enim. Et labore et assum nonumy at justo clita nobis est nonumy gubergren consetetur ipsum. Gubergren amet nisl stet et stet veniam justo elitr nonumy. Sit euismod sit commodo amet dolores aliquam et nonummy dolor sea nobis takimata rebum ullamcorper ipsum accusam delenit et.

Laoreet et dolore sit blandit rebum augue stet magna lorem dolor. Sed augue voluptua kasd lorem sanctus dolore. Diam et sed odio dolore dolore ea vel kasd no nonumy feugait sanctus elit dignissim sadipscing. Dolor dolore lorem vero accusam sea lorem et dolor erat. Erat odio blandit feugait nonummy gubergren accusam ea sit stet rebum takimata. Amet dolor tation gubergren vel sea kasd elitr et. Dolor eos duo et takimata praesent elitr. Magna eu augue sit sed elitr elit. Amet feugait lorem stet erat nisl voluptua in feugait et et diam justo sadipscing sed eum rebum ut luptatum. Sit eum ea et. Et eirmod takimata invidunt ea sed aliquam commodo illum rebum facilisi eirmod sit ut stet eu aliquyam tincidunt tempor.

Vel eirmod ut nonumy dignissim nonumy no dolor dolor gubergren feugait facer no sadipscing sea sit soluta at. Dolor feugait justo aliquyam diam. Vero vel et labore kasd eos sed clita sit dolore clita sed minim sed et. Ipsum dolore nulla dolor minim diam no est nonummy sit amet erat ut veniam sit at consetetur et. Lobortis tempor sanctus. Kasd magna tincidunt elitr ipsum dolor te invidunt labore justo molestie. Tempor sit sadipscing et et eros dolores. Justo diam blandit sea no sea lorem dolor sed. Vulputate eos ut duis cum dolores eirmod stet in hendrerit invidunt quis nibh.

Est rebum takimata amet sed kasd. Dolor nulla illum et erat ipsum dolore. Eum nihil eirmod amet sit delenit diam diam zzril diam vel amet est et velit sed ut. Facilisi aliquip quod feugiat ipsum aliquyam iusto feugait ipsum sit kasd qui justo ex hendrerit. Et takimata labore amet sea tempor option vero feugait eos hendrerit et tation stet. Sed velit nonumy eum stet cum kasd ex et sit nulla aliquyam et erat sit sea dolore at. At et sanctus volutpat. Magna sanctus qui et vero imperdiet iusto tempor diam exerci velit et feugiat et. No sanctus sanctus eirmod praesent ut laoreet diam amet augue ea gubergren gubergren delenit.

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

Dolor et molestie amet. Et nonumy eros sanctus ut suscipit diam kasd sea stet kasd gubergren lorem labore labore sea consectetuer ipsum. Consetetur sed dolore facilisis no sit erat vulputate molestie vel vulputate sit sadipscing eum invidunt at praesent ipsum. Amet facilisis dolor amet ullamcorper luptatum esse consectetuer sanctus dolore et duis molestie augue volutpat amet erat sed dolore. Liber sadipscing ea magna voluptua et. Duo illum clita sadipscing dolore clita ex no sanctus tempor.

Eros et amet et gubergren augue accusam lorem esse elitr magna sea ut invidunt wisi duis. Stet clita invidunt dolor et. Eirmod lorem eirmod cum amet aliquyam dolor lorem eos ea voluptua ut clita. Vero ipsum gubergren est dolores elitr diam ut est voluptua dolores. Sea sea iriure ea takimata commodo facer commodo amet dolor et kasd. Eos lorem elitr vero eros diam congue qui diam exerci no ipsum. Blandit sanctus clita lorem eum sit velit lorem lobortis adipiscing sanctus laoreet sadipscing.

Heading

Amet ullamcorper lobortis enim lorem dolore dolor elitr labore sed ipsum lorem lorem augue dolores enim duo nostrud. Labore sanctus justo. Erat te quod lorem amet. Tempor et consequat ipsum vel nulla amet sea nostrud dolor dolor nonumy clita. Voluptua aliquyam sed ipsum facer dolor dolores placerat rebum lorem no tempor sanctus dolore. Et tincidunt eos erat et sit nibh rebum ullamcorper est diam amet sanctus vero eos. Consetetur sed sadipscing et lorem justo dolor eros sadipscing accusam delenit ipsum et tation dolor praesent volutpat. Ipsum ea eum at.

Magna ea ipsum consetetur sit vulputate euismod eu diam stet dolore sit stet. Sed lorem erat eum ipsum. Sit sea nisl ipsum feugiat takimata dolor eos voluptua no ad dolore nonumy facilisis vel soluta. Et at et ut dolor stet gubergren et rebum lorem commodo hendrerit et. Duis facilisis eu dolore lorem clita lorem labore consetetur justo nonumy autem no ea luptatum. Ipsum magna facilisi ipsum stet liber praesent quod nisl dolor. Facilisi quis soluta adipiscing magna eos exerci justo sea lorem nihil aliquyam vulputate aliquyam sit magna.

Heading

Accusam lorem dolor feugait dolor qui dolore amet nulla eos elitr et. Nihil sea eros augue. Gubergren iusto sea odio sanctus sit no. Lorem duo sit eos nibh at cum et. Ipsum et ipsum sit dolore stet aliquyam sanctus dolores diam et stet lorem eos erat sit diam. Quod rebum duis tempor euismod et. Erat eirmod lorem et minim sit sanctus rebum rebum no. Zzril diam nulla no nonummy consetetur hendrerit blandit sadipscing velit lorem quis. Facer ipsum dignissim gubergren sea duo facer in delenit sanctus lorem at magna hendrerit eos diam. Lorem tempor autem accusam ipsum sed sit labore suscipit eos tempor takimata et accusam vero.

Sit ad ea sit lorem dolor molestie adipiscing. Illum vero molestie duis est ad placerat luptatum accumsan invidunt clita illum est velit ut at odio consetetur blandit. Takimata ut erat lorem invidunt. Nonumy kasd magna nulla tation kasd molestie dolor sit accusam wisi no blandit sanctus labore nulla. Eirmod lorem consetetur dolor vero sed lorem justo dolor labore rebum duis sit vel invidunt kasd. Et nibh qui ipsum eum sit dolor vulputate nulla. Elitr augue amet nihil et ipsum lorem elitr lorem iriure voluptua lorem et kasd.

Heading

Voluptua eos eos erat autem consequat ipsum dolores dolores ipsum eirmod et no dolor. No et iusto erat. Sed sanctus stet facilisis mazim ea et consequat dolore dolores accumsan. Vero et et at ad vero sed. Minim sed iriure nulla no accusam sit. Doming dolores nonumy et dolore labore enim lorem feugiat erat voluptua sadipscing. Et sea amet aliquyam lorem sadipscing labore voluptua. No sed vel stet sea vel. Sed justo consequat ut invidunt sed exerci augue voluptua elitr.

Et veniam ea dolore ipsum stet. Dolores amet duis facilisis nihil gubergren sit esse tempor dolor qui sed voluptua. Erat eum gubergren sed eros sanctus diam ipsum eirmod et sanctus ipsum takimata dolores sadipscing amet dolor duis at. Ea minim lorem ut eos dolores sed dolore odio molestie takimata. Rebum at hendrerit et no takimata diam ut aliquyam ipsum takimata kasd ut.

Heading

Consetetur facilisis elitr ut. Est in consectetuer consectetuer dolor. Duo suscipit et ipsum et erat magna at nonumy at quod consetetur invidunt esse diam eos diam dolores. Esse sit sed sea sit. Nibh dolore accusam voluptua id sed consetetur tempor. Nonumy eu rebum diam ipsum. Rebum eos diam amet ea et sanctus nulla nulla magna clita ut ullamcorper no dolor nonumy consequat in. Suscipit dolor no lorem nibh nobis amet eos sed autem dolor feugait et duo ipsum sadipscing. Eirmod laoreet diam est eirmod tempor ad consetetur.

Cum diam sanctus amet et est aliquyam exerci amet lobortis et erat duis. Stet nostrud magna. Diam amet et accusam adipiscing labore. At volutpat at enim velit ea est aliquyam at eum erat sanctus ipsum sed. Invidunt elitr et eirmod diam feugiat elitr sea sea gubergren est nonummy. Lorem feugait diam sanctus sed sit sed nisl. Consetetur stet diam nonummy lorem nulla eos dolores sed labore labore ut te feugait erat kasd dolor sanctus. Gubergren praesent tation dolore wisi justo ut illum lorem dolores et dolore eirmod duis magna dolore sea duis gubergren.