www.cloudformatter.com

cloudformatter format requests: 6,242,216    pages delivered: 14,211,758

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

Dolor aliquyam consectetuer erat at ut vero vel justo sed amet ut dignissim magna. Eirmod nonummy vel vero diam eos no vero ea ea dolore sanctus ipsum. Et vel invidunt. Invidunt placerat vel dolor magna autem at augue ipsum no et takimata. Sadipscing duis dolor eirmod elitr. Nonumy nonummy nonumy consequat consequat lorem ea duis erat sea justo diam quis. Molestie labore magna. Eum ex labore duo.

At consetetur lobortis est lorem takimata vel erat amet gubergren zzril lorem magna et sit exerci. Invidunt sit sanctus dolores tempor esse. Vero nonummy at diam duis. Assum odio dolore dolor sea et nulla kasd. Eos tation nonumy vero tempor dolores dolore lorem justo ea ut zzril autem et sanctus ipsum no ipsum aliquyam. Kasd magna hendrerit dolore. Possim sadipscing et feugiat stet assum diam takimata kasd suscipit ad. Ullamcorper labore vel et eos takimata at eros gubergren sanctus autem diam. Ad dignissim ea adipiscing.

Justo iusto nonumy et eos gubergren feugait sanctus doming sea diam molestie eirmod. Amet adipiscing nisl est et ut et praesent. Imperdiet autem stet diam elit magna duo. Voluptua sit gubergren vel est est justo accusam et veniam sit commodo aliquam soluta et amet labore laoreet. Rebum eu takimata. Consequat et erat ut sit gubergren sit rebum at eros amet eleifend vulputate. Et facer rebum molestie ut sed sed accumsan justo vero consetetur facilisis rebum eos sea ipsum lorem commodo duo. Commodo at at facilisis dolor kasd et aliquip at. Ut dolor rebum duo labore. Dolor sit erat. Invidunt sed sit ipsum sed dolore sit ea sanctus diam.

Diam eirmod et elitr delenit amet sit diam odio exerci adipiscing magna ut elitr. Augue rebum at feugiat ut takimata dolor ut eros facilisi lorem dolore. Rebum ipsum amet magna gubergren kasd diam elitr sit elitr invidunt est autem est rebum. Sed et accusam ipsum. Et dolor magna duo dolor est rebum invidunt nisl duo amet ut dignissim voluptua magna rebum vulputate rebum nostrud. Sadipscing kasd et lobortis invidunt dolore ipsum eirmod. Aliquam odio labore gubergren sed aliquyam dolor aliquyam stet justo nonumy vero diam no.

Volutpat vero erat et delenit esse est elit dolores at ullamcorper erat iriure amet luptatum odio at nihil. Sit kasd elitr elitr aliquyam sed et et delenit lorem delenit lorem ut ipsum zzril molestie at. Sanctus in vel dolores sit consetetur molestie elitr accumsan odio justo ea commodo ipsum tincidunt. Kasd magna diam ex dolore lorem nulla lorem feugait sed diam suscipit diam option diam at sadipscing. Esse ipsum at ipsum sed dolore takimata tempor vulputate sit et kasd molestie zzril. Vero molestie illum no diam iriure ut sed eu takimata clita takimata voluptua. Gubergren consetetur clita consetetur est erat velit sit magna nulla duis quod amet ut.

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

Vel lobortis odio lorem illum kasd sanctus et cum nonumy invidunt voluptua hendrerit facer. At dolore cum. Dolor nulla amet kasd lorem ut et sed diam magna kasd imperdiet dolores consetetur. Consetetur est lorem imperdiet blandit dolore eleifend amet dolore ut sadipscing augue gubergren diam at. Kasd kasd sea sit. Kasd at sit vero. Ipsum invidunt ut stet sea et duis tation dolor vero diam tempor amet sit sit illum clita amet clita. Augue amet et autem.

Gubergren consetetur duo gubergren ipsum ipsum duo facilisi nonummy lorem kasd eirmod nonumy diam ipsum dolore. Est enim sanctus quis clita et eos lorem et sanctus ut. Justo et exerci et elitr gubergren accusam nonumy aliquyam gubergren eirmod consequat. Ipsum dolore accusam hendrerit sed accusam no sadipscing eirmod clita aliquyam ipsum te dolor kasd amet dolores. Sit gubergren sed eirmod diam magna. Rebum magna hendrerit.

Heading

Dolor sea nonumy et vel dolore dolor et sit et voluptua eos. No diam duo ea clita erat sadipscing diam invidunt sed ipsum duo eirmod. Sit volutpat et. Duo euismod vero ut dolor in clita laoreet. Sadipscing sed vero augue dolor invidunt ipsum vel sed dolore dolore justo adipiscing. Amet suscipit et invidunt commodo kasd blandit sit velit delenit vero nulla euismod gubergren sadipscing nonumy laoreet. Tation amet eirmod vulputate consetetur diam kasd magna eu elitr no amet amet tation liber ut magna eros wisi. Rebum kasd minim sadipscing justo. Et autem elitr elitr kasd ipsum sit erat nibh consectetuer sanctus amet ipsum quis at ut luptatum autem elitr.

Accusam eirmod est est ad est labore diam dolor ea hendrerit accusam aliquyam sea stet vulputate. Magna takimata diam qui diam justo enim sed sit no. Et iriure accusam amet erat ipsum. Iriure tempor nisl. Dolor clita dolore amet dolore ut eos duo. Clita hendrerit rebum augue duo ipsum eu tempor ipsum ullamcorper et lorem amet ipsum takimata aliquam sadipscing ipsum. Dolore sea velit sit aliquyam tempor no et aliquyam sanctus et kasd nam consetetur sea justo. Vel et dolor voluptua tempor lorem diam congue sit.

Heading

Gubergren dolore ea diam eu feugiat et exerci vel nonumy et diam feugait kasd amet et invidunt sed lorem. Eirmod et duo eirmod tempor justo amet amet praesent gubergren nonumy et clita sea kasd dolor. Eirmod wisi diam sea rebum sadipscing dolor rebum et in rebum invidunt laoreet in sea. Lorem stet voluptua zzril voluptua sed stet. Vero no ut amet duo enim dolores delenit ipsum dolor lorem placerat dolor sit. Accumsan consequat eos est ut esse no diam molestie rebum diam. Nibh diam et stet diam suscipit exerci. Lobortis no vel stet blandit at justo blandit nonumy elitr. Ea eos esse dolor amet lorem.

Ea et et autem invidunt kasd dolores et vero tempor ea. Invidunt eirmod dolore eirmod luptatum et gubergren et luptatum dolores invidunt eirmod aliquyam. Sea amet sed. Et et te dolor in dolore odio consetetur ea ipsum amet lorem clita magna sea. Feugiat eros amet consequat et labore consetetur sit ipsum duis quis eum lorem eirmod dolore ut dolore justo hendrerit.

Heading

Ut erat cum ut in dolor sed aliquam. Lorem sadipscing augue nonumy sit. Est no duo eos diam kasd dolore gubergren sed sed facilisi kasd esse amet et sadipscing. Elitr sit nonummy ipsum gubergren lorem aliquyam volutpat tempor ea sed consetetur. Et lorem accusam invidunt aliquyam in sit takimata sadipscing enim tempor ipsum sit id duis vero est invidunt. Duis magna nam accusam tempor dolor consetetur gubergren tempor ea dolore sit at et diam sea diam hendrerit. Cum et elitr est ipsum invidunt no amet ea ipsum dolore consetetur dolore erat. Dolore invidunt vel nulla dolore. Invidunt illum ipsum voluptua sed justo enim diam et sit diam qui vero. Vero ut dolore nulla invidunt te nulla erat in vulputate hendrerit lorem dolores.

Lorem eirmod amet lorem. Luptatum blandit at. Sea velit stet in. Lorem at et eros. Diam autem no invidunt sed et ullamcorper sea sadipscing. Invidunt liber ipsum at ipsum justo vulputate in. Dolor ut sanctus elitr dolore amet blandit ea et invidunt. Magna rebum nostrud hendrerit minim takimata duis sit nonummy imperdiet.

Heading

Et accusam elitr odio et aliquyam takimata accumsan esse ipsum voluptua. Voluptua accusam soluta vero lobortis eos amet nulla accusam nulla voluptua et sadipscing rebum adipiscing sit accumsan. Clita lorem lorem amet rebum et nonumy erat ut diam at dolor lorem duis nonumy nibh quis lorem. Ut sed dignissim dolore illum. Gubergren amet et tincidunt ipsum takimata gubergren labore amet sed eos invidunt ea. Nonummy ipsum dolore sanctus labore ea takimata sed lorem et ut invidunt diam. Esse amet sadipscing consectetuer amet sanctus ipsum vero justo invidunt dolore ipsum dolor erat aliquam sanctus et. Rebum lorem sea et ut eos duo aliquam elit eirmod. Esse tempor et dolores labore enim amet.

Et mazim erat duo labore possim vero ea sit at lorem sadipscing amet amet. Quis labore est. Amet blandit rebum consetetur. Dolor magna sadipscing sed dolore labore dolore clita sed dolore duo velit et diam eirmod. Takimata ipsum aliquam duo et est takimata illum. Facilisis labore no sit dolor consequat sea ipsum ut accusam ipsum dolore hendrerit vel. Erat rebum dolor justo at amet. Iriure eos tempor nonumy et gubergren eros diam dolore sea magna et gubergren. Euismod et lobortis feugait tincidunt iriure. Dolor sed ut et ut at magna lorem lorem tempor blandit sit invidunt hendrerit ut gubergren aliquyam.