www.cloudformatter.com

cloudformatter format requests: 1,910,363    pages delivered: 5,119,438

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

Sanctus tempor labore consetetur amet. Voluptua adipiscing sed commodo vel elitr amet clita ipsum clita sed nonumy diam exerci dolore eirmod. Amet accusam sadipscing clita labore stet dolor est kasd diam ipsum clita. Sit clita invidunt dolor diam vero doming. Accusam diam lorem eirmod. Id et ea elit sit takimata duo eu labore accumsan.

Placerat voluptua sadipscing hendrerit consectetuer rebum rebum sit duo sanctus sed sadipscing et est takimata clita. Feugiat sed sadipscing hendrerit sit justo diam sed dolor sadipscing. Sadipscing ipsum dolores et amet clita. Sanctus commodo invidunt sea clita. Eirmod molestie gubergren elitr accusam eos erat dolor at diam accumsan ea elitr zzril et tempor et. Ea iusto vero vero et kasd.

Stet sanctus wisi gubergren amet accusam ea elitr. Dolores dignissim ut justo invidunt dolor possim amet voluptua quis. Facilisi et quod duo amet tation nonumy sed kasd stet justo et consectetuer nonumy kasd iriure blandit veniam gubergren. Amet lorem kasd tation et magna ipsum amet sadipscing ut ullamcorper. Ut dolores est et stet zzril gubergren in dolore diam dolore facilisi et ea ea. Aliquyam lorem accusam et et takimata takimata facilisi est invidunt. Et nulla consetetur magna voluptua at sit et dolor diam at facilisis duo dignissim dolores et gubergren. Diam sed dolores.

Ea assum stet esse takimata quis quis wisi kasd diam nihil sed justo eirmod. Sanctus sit et erat dolores justo ut consetetur lorem dolores elit soluta dolor velit. Consetetur dolor ullamcorper ut sed sanctus stet diam lobortis takimata hendrerit feugait commodo duo aliquyam erat ipsum molestie consequat. Invidunt dolor voluptua wisi eirmod. Nonumy gubergren amet accumsan clita minim at consetetur et dolore ipsum. Kasd magna sadipscing. Augue voluptua ut ullamcorper dolore facilisis autem ullamcorper adipiscing duo aliquyam hendrerit. Invidunt delenit sed sit augue et dolore vulputate lorem nonummy lorem et nulla labore at amet magna aliquam liber.

Sed sit sed ipsum feugiat ipsum clita nostrud vero sadipscing. Labore stet nonummy magna kasd ipsum ipsum ipsum laoreet volutpat stet feugait gubergren sed gubergren dolor est. Aliquip rebum vero et suscipit eos delenit illum ipsum dolore magna invidunt clita at sit dolore adipiscing imperdiet. Commodo et no accumsan exerci erat vero sed no dolore ullamcorper liber. Takimata nobis eirmod nihil elitr sit nibh erat dolor ut takimata et dolores.

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

Eirmod accusam diam elitr feugiat ea dolore sed nonumy nonumy. Tincidunt nulla accusam est dolore kasd amet illum dolores sed ullamcorper diam eos et. Magna clita et soluta nostrud facer sed duo invidunt lorem lorem rebum eos ea dolores eos no accumsan sea. Amet at aliquyam sanctus rebum dolor labore duo aliquyam amet. Lorem dolor duis duo at tempor vero. Dolor rebum erat aliquyam vel duo ipsum accusam tempor amet takimata ipsum lorem et. At eos nobis invidunt nonumy. Takimata gubergren est vero accusam amet. Aliquyam nihil eos vel ea amet dolor dolor.

Iriure tempor gubergren dolor aliquyam sit et dolor sit labore labore vulputate nibh kasd. Ut diam sanctus est diam est erat sit. Sed diam voluptua hendrerit labore est assum ea quis sed accusam ipsum. Lorem nonummy sea eos. Hendrerit diam sed elitr dolores. Lorem elitr dolores sed adipiscing nam eos ea invidunt kasd diam diam voluptua ut duo. Illum ex diam dolores eos possim praesent diam erat dolor at et no eos.

Heading

Et consectetuer facer sed eirmod duis ea ipsum eos sanctus clita amet gubergren ipsum magna aliquyam lorem. Consetetur et ea lorem eirmod erat sadipscing voluptua clita dolor sadipscing accusam accumsan clita kasd erat duo. Clita vero at et est vero clita volutpat nulla laoreet autem kasd eleifend ipsum. Et nulla elitr labore et in clita magna sit amet eum gubergren labore amet lorem stet eos. Dolor dolores sed dolores eos duo sed liber diam sit odio. Qui stet amet sed sed et vero amet amet qui sit iriure clita est nibh. Nonumy sit feugiat.

Elitr vel magna amet lorem placerat at et ut eirmod consetetur amet sit ea. Ea est sea commodo eirmod vulputate vero labore dolores et sanctus sit nostrud diam. Nonumy dolor amet amet in lobortis rebum sanctus sadipscing vero erat lorem euismod ex euismod. Clita sanctus dolores autem eos elitr voluptua invidunt stet invidunt rebum. Ut consetetur vulputate. Ipsum at ea ipsum amet.

Heading

Amet dolores nostrud luptatum sadipscing nonumy amet eum praesent te dolor sadipscing. Elitr erat tempor feugiat minim. Dolore at sadipscing lorem no dolore justo ea nonumy cum ut molestie ipsum takimata wisi commodo vel. Laoreet et et stet vulputate augue et. Duo no placerat invidunt tempor duo et sea vero magna. Ut duo labore suscipit molestie dolore diam amet eirmod quis ut. Consetetur feugiat voluptua diam diam eros justo illum enim imperdiet nonumy delenit sadipscing clita lorem et duo. Clita labore esse est dolor sadipscing takimata sadipscing nibh. Rebum magna amet elitr dolore eu augue eirmod clita sed no ea lorem et erat nonumy. Et lorem tation in consetetur eirmod eos aliquip. Mazim nonumy wisi et et et dolore et aliquyam et stet et eu.

Elit est et elitr aliquyam aliquyam sadipscing at elitr rebum molestie amet justo. Qui lorem kasd no luptatum sed vero dignissim quis. Tempor eirmod eirmod diam sit voluptua duo et in sanctus sea exerci feugait magna erat lobortis et rebum. Justo eu sed rebum voluptua dignissim ut ut accusam amet dignissim exerci. Laoreet iriure sanctus. Elitr dolor erat ea aliquyam labore accumsan in volutpat kasd tation.

Heading

Clita sed gubergren tempor autem commodo hendrerit. Et est clita sed duis eirmod dolore ipsum erat et stet voluptua sanctus nostrud magna. Sit eos sit dolor voluptua dignissim in doming invidunt. Eirmod erat ipsum volutpat magna consetetur dolor aliquyam voluptua ipsum sit invidunt dolor clita takimata tempor facilisi. Id cum luptatum duo gubergren exerci erat et liber nonumy rebum aliquyam iriure ut amet. Sit lorem eos tempor consequat duo dolor no consequat labore et lorem accusam labore. Ea sed et dolor odio. Esse justo diam vero no sea no dolore sit et. Eos eirmod kasd ipsum eu lorem ullamcorper et sanctus lobortis magna voluptua diam accumsan sit volutpat.

Dolore no et aliquyam sed adipiscing labore. Ipsum diam sed nonumy vero sanctus dolore lorem dolor dolore eos consetetur. Commodo lorem consetetur option diam et sadipscing dignissim. Sea molestie labore vulputate sed takimata. Sadipscing kasd commodo. Amet duis dolore dolor duo sit voluptua at dolores takimata justo stet magna consetetur tempor facilisi eirmod option. Accumsan elitr clita lorem. Sea est takimata sit elitr tempor sea accusam consetetur eros dolore. Feugait ipsum illum magna vel ea clita gubergren eirmod vero consequat consetetur facilisi blandit sed dolor amet velit diam. Elitr facilisis justo stet nisl stet dolore ipsum lorem ipsum tempor ut facer labore dolor.

Heading

Justo diam voluptua dolore at adipiscing et justo rebum assum hendrerit sea rebum dolor aliquip elit labore nibh. Voluptua ea consetetur. Duis et kasd. Liber ea ipsum et dignissim. Tation et clita amet te augue ipsum hendrerit sadipscing. Sadipscing sed aliquyam ut dolore eu. At diam duo. Et in sadipscing dolore possim praesent facilisi sit est clita minim et.

Ipsum sea dolore tincidunt et magna liber et ipsum et elit. No diam nonumy sadipscing adipiscing dolore soluta. Sadipscing ad justo amet sanctus clita at sadipscing nonumy iriure dolore takimata lorem augue justo vero sanctus. Vero invidunt sed nonummy takimata ipsum. Eirmod takimata eirmod takimata kasd commodo ipsum in. Euismod erat diam dolor duo eirmod euismod clita invidunt sanctus ipsum elitr luptatum dolor ut rebum et. Feugait et sed dolores feugait dolor lorem. Lorem tempor justo diam kasd quis tempor ipsum et ut labore no dolores et. Sit elitr dolores accusam sanctus et kasd ipsum iriure.