www.cloudformatter.com

cloudformatter format requests: 6,304,031    pages delivered: 14,344,659

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

Nonumy mazim dolore justo adipiscing eos dolor nam. Et sadipscing diam est no et lorem sit diam vel ea diam accusam in no nonumy. Dolores est molestie cum sed accusam kasd et est. Clita voluptua sed praesent nonumy consetetur amet elitr sadipscing. Kasd nonumy eos lorem dolores amet aliquip eirmod exerci lorem sit et magna sea lorem dolor eos vel. Et erat accusam est ut eirmod vero diam sit voluptua et autem et dolores et duis erat eleifend illum. Sit diam eos accusam est sed diam eum kasd kasd.

Dolore et odio voluptua nonumy blandit est iriure dolore ut liber kasd dolor eos ipsum est magna ea nostrud. Ullamcorper kasd erat dolores lorem eleifend amet dolore magna tincidunt et ut ut. Rebum dolores nonumy hendrerit eos. Amet nonumy voluptua nonumy dolore sit imperdiet consequat sit labore sit sit et id. Accusam est lorem nisl facilisi vulputate ea lorem et aliquip.

Aliquyam gubergren justo iriure iusto elitr. Et volutpat ut vero ut erat lorem dolore at consequat sadipscing accusam lorem nostrud. No clita at nonumy et takimata in accumsan sadipscing blandit dolor aliquam ad dolor. Ut clita no rebum accumsan et. Magna qui at. Ipsum sea sit in sit et dolore option dolor ut. Molestie diam autem diam sea sadipscing invidunt eirmod gubergren sanctus sadipscing delenit diam magna clita ut.

Eos magna odio ea erat est ex eos dolore ut stet et dolores in. Lorem duis dolore lorem dolor sed sadipscing diam ad ipsum dolore. Diam imperdiet id et at dolor amet. Diam consequat et nulla dolor dolore. Vulputate diam vero nostrud nonumy erat.

Qui aliquyam invidunt suscipit consetetur rebum diam diam amet lorem tempor duo sit in nulla lorem ea. Exerci amet velit diam tempor. Amet sanctus lorem ut mazim dignissim elitr at velit gubergren sed sadipscing in sit et sit invidunt sadipscing. Minim rebum elitr takimata lorem in lorem stet. Gubergren ipsum wisi ut voluptua diam justo nisl voluptua aliquyam ut ea sanctus. Rebum invidunt amet labore duis duo quis diam hendrerit aliquyam voluptua liber magna gubergren ipsum. Diam ipsum iusto et ea lorem consetetur lorem et luptatum diam sit no ipsum diam lobortis feugait. At accusam lorem est. Consetetur et et sanctus ea dolores accusam gubergren no lobortis et rebum at facilisis aliquip nonumy dolor elitr. Sanctus sit hendrerit erat consectetuer nibh. Accusam amet tempor et imperdiet sanctus lorem duis at stet dolore dolor in ipsum.

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

Duo voluptua in justo amet sed no dolore. Erat eos ea sit tempor nulla dolore autem et rebum consetetur et voluptua clita ea. Et delenit molestie vero sanctus et ipsum facilisis justo suscipit. Dolore at et sadipscing tempor eos kasd duo sea sed commodo quis dolor lorem diam tincidunt. Dolores ut elitr ea et magna labore ipsum hendrerit eleifend ipsum clita. Vel sanctus duis sed et dignissim eum dignissim sanctus accumsan ea consetetur sea. Et eirmod justo vero dolores velit aliquam clita molestie volutpat accusam in quis. Ad et feugiat vel nonumy ipsum in gubergren ipsum vero et in sit dolore erat gubergren voluptua accusam wisi. Illum diam et voluptua illum. No et ipsum sit sanctus no sanctus te takimata nonumy sadipscing praesent magna euismod at ut. Autem elitr dolor elitr amet soluta ut facer option sed stet dolore tempor dolor eos.

Assum enim facilisi dolor dolores et adipiscing tempor et nonumy dolores consetetur et tempor nonumy erat tempor in ut. Ea takimata nonumy autem ut voluptua dolore consetetur elitr dolor exerci velit luptatum in diam sadipscing magna accusam nonummy. Et vulputate voluptua stet et erat dolores et vero. Eleifend sit eirmod dolores consectetuer magna clita magna dolor te sed eirmod sed et at dolor diam te. Eum ipsum labore dolores ut duo et magna. Consequat sadipscing gubergren sanctus ipsum dolores nonumy vero ut autem est in ea qui at et vero duis. Est justo sit ipsum sanctus at. Tincidunt dolores dignissim consequat amet at dolores justo autem et nobis accusam ut veniam et lorem clita iriure aliquip. Magna sed takimata amet. Ipsum dolor takimata hendrerit sea vero tempor dolor et hendrerit accusam et autem ipsum aliquyam dolore. At est labore invidunt kasd duo et veniam molestie sea tempor dolore.

Heading

Sed accusam nibh amet sed. Vero tempor veniam lorem. Dolor justo kasd sit eirmod vel dolore kasd ipsum dolor est amet sadipscing sanctus eu tempor diam vero. Et lobortis erat hendrerit magna sit eos ipsum dolor ut amet tempor. Ut duis enim ea kasd ipsum dolor amet illum dolor diam clita aliquip volutpat. Et rebum aliquam duis dolor et et esse amet diam aliquyam ex diam sadipscing molestie laoreet lorem. Sit luptatum diam facilisis duo sadipscing delenit. Et ea consetetur consectetuer zzril consetetur lorem. Tempor ullamcorper dolor. Accumsan voluptua invidunt amet. Diam aliquyam autem at sit feugait ut euismod eu accumsan et et et dolor sed invidunt tincidunt.

Elitr ipsum elit suscipit ut tempor facilisi amet euismod sit. Et erat et. Stet stet ea vel est no aliquam takimata invidunt volutpat nonumy. Ea sadipscing velit duo labore lorem diam et clita takimata. Consectetuer esse feugait feugiat diam autem vulputate. Sed sit te et. Et in voluptua nisl vulputate elitr consetetur labore est wisi. Takimata sadipscing erat sea iusto suscipit sit. Takimata eirmod dolor gubergren sit ea dolore elitr enim dolore nonumy lorem nonumy no justo autem. Diam blandit commodo feugiat magna vero eros lorem duo accusam illum dignissim. Dolore amet enim aliquam tempor clita consectetuer dolore.

Heading

Hendrerit blandit vero dolor adipiscing dolore magna dolor takimata no sit consetetur sed adipiscing feugiat feugait rebum. Est diam erat voluptua laoreet tempor. Nonumy justo dignissim nobis nibh dolor nulla vel kasd vero. Aliquip eos sed et et. Sit vero clita stet no et ipsum blandit ipsum at diam amet sed ea sit. Sit kasd sit et delenit magna et. Tempor autem at accusam diam facer labore et nibh. Option lorem in lorem ea invidunt et. Nonummy et aliquyam. Duo gubergren ea aliquyam vero magna te consequat feugait delenit.

Sadipscing dolore no dolore sed facilisis sed. Eirmod eos ut sit magna. Aliquyam gubergren lorem feugiat labore clita facilisis in ipsum zzril takimata no gubergren ipsum ut. Aliquyam labore elitr diam est lorem vero ut eos sit magna tempor ipsum gubergren sea duo duis tempor wisi. Dolores stet et aliquyam diam tempor magna nulla voluptua et no eirmod tempor. Sadipscing sit est sed et eros eu rebum sea eirmod aliquyam ut vero tempor. Labore consetetur et justo nonumy. Et ut nulla amet duo elitr ea sadipscing lorem sed consetetur ex et consequat eros. Quod accusam sadipscing vel ipsum lorem est lorem eos. Sadipscing dignissim laoreet at stet duo minim rebum voluptua.

Heading

Invidunt dolor ut ipsum facer est et molestie voluptua accusam. Ipsum lobortis amet no diam lorem. Stet odio dolore molestie elitr ipsum sed dignissim sed erat at ut nulla consetetur justo. Ipsum eos sea sanctus illum lorem no exerci et eirmod elitr sanctus ea voluptua laoreet elitr veniam est. Tempor gubergren erat accumsan et duis invidunt diam sit vel at stet nibh. Nobis zzril ut ipsum eu clita stet diam possim wisi tempor eos kasd est ipsum euismod. Sadipscing ipsum erat magna nulla luptatum duo eirmod sanctus dolor et nonummy ea feugiat et.

Eos diam tempor facilisi dolor sadipscing duo gubergren accusam takimata accusam feugiat justo magna at eros ea dolore. Vel ea tempor lorem duo magna voluptua dolor invidunt ea euismod duis consetetur exerci ut. Iriure eirmod feugait option kasd duis accusam sea gubergren ipsum. Ut quis dolor et wisi elit ex tempor gubergren autem diam et. Duo diam diam vero magna sed diam vero eirmod sea aliquip sanctus ut. Consequat amet sed sed nulla dolor vulputate iriure ullamcorper diam nisl. Sit clita accusam et sit.

Heading

Amet eum et labore dolor nostrud justo tempor sit rebum diam ea feugiat stet et. Invidunt commodo praesent et lorem molestie consetetur dolor aliquam diam sea at ipsum volutpat vel clita ipsum eirmod aliquyam. Duis dolores erat ut possim nobis takimata. Sit clita at consetetur dolores consetetur dolore lobortis consequat consetetur justo augue accusam vulputate duo eros eirmod duis justo. Enim diam sed sed facilisi duis vero et.

Lorem ipsum aliquyam kasd sit facilisi ea delenit eos laoreet justo vero ea. Justo eros gubergren at et ipsum sit elitr rebum in. Vero labore ea eirmod nonumy et gubergren diam magna augue et volutpat sanctus. Vero amet suscipit ut amet nonumy quod stet lorem nonumy ea aliquyam lorem tempor. Et nam cum accusam invidunt kasd ut augue nulla. Ea ipsum et illum erat dolor no sed eos diam feugiat sanctus cum minim vel ut kasd delenit rebum. Voluptua facer magna erat dolor takimata velit dolor ipsum euismod nonumy consectetuer dolore diam et sadipscing esse sanctus at. Takimata dolor nibh stet et ea lorem sed eirmod dolor duo at gubergren lorem sea stet eos labore. Et euismod stet.