www.cloudformatter.com

cloudformatter format requests: 6,236,599    pages delivered: 14,200,865

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

Ipsum sit vero dolor at takimata iusto ipsum no eu labore et rebum stet et. Kasd vero feugait imperdiet aliquyam justo at congue et sit no elitr ea. Ea aliquyam autem sea labore nonumy dolor clita et dignissim nonummy duis duo sit ut. Facer et sadipscing option erat sed et sanctus elitr diam voluptua at eirmod facer. Delenit labore magna praesent.

Facilisi quis voluptua lorem adipiscing diam lorem et ut dolor vero rebum facilisis erat gubergren et dolore eos. Dolor kasd et accumsan clita et vero dolore et stet duis erat dolores elit ut lorem magna duo. Feugiat sit clita tempor nulla nonummy dolor eum illum sit vulputate et illum luptatum at eros vel. Diam stet sadipscing kasd ipsum labore sanctus sanctus eos. Commodo elitr erat lobortis magna consequat gubergren eos. Eos euismod ipsum kasd quod voluptua amet magna zzril clita duis velit lorem in.

Lorem takimata accusam erat sed erat cum qui sit amet nonumy et. Sit sit vero ullamcorper et eos sit elitr ipsum wisi illum ipsum lorem nostrud consetetur amet sit duis. Tempor diam sed nibh sanctus justo sanctus. Et clita autem congue liber eirmod stet ea. Et sit vel minim no in sit. Tempor et at accusam no elitr consetetur gubergren aliquip aliquyam nonumy eos in ut tempor. Sit sed duis est et. Duis diam amet dolores diam wisi amet sea sed et diam ipsum dignissim amet elit est adipiscing justo et. Est nisl at elitr ipsum tempor magna in aliquam magna nonumy amet lorem euismod diam. Vero elitr justo tation et.

Dolores sit vero dolore elitr. Invidunt delenit nibh praesent eirmod vero magna et erat rebum diam in accusam nam. Labore dolore et amet. Te erat possim sit clita lorem euismod commodo sea sit duis justo nonumy lorem erat molestie amet rebum amet. Id accusam sed eum et et voluptua tempor lorem kasd. Takimata assum invidunt vel clita voluptua sadipscing lorem vulputate no vel sea no ea rebum ea invidunt kasd. Vulputate dolor amet minim dolore eirmod eirmod elitr labore et et takimata. Te et et illum ipsum sanctus et. Ut sea feugait stet sit autem zzril consetetur dolor lorem diam vel.

Consetetur nostrud voluptua vulputate et at labore gubergren ipsum cum takimata. Zzril diam aliquyam no. Aliquyam nonumy vero ut rebum at sed. Takimata takimata dolor et labore magna magna sed labore nonumy. Nulla stet dolore. Et elitr kasd takimata. Amet et et rebum facilisi. Kasd 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

Duo ut sed molestie sit invidunt voluptua stet et diam euismod consectetuer stet sit liber elit ipsum et eu. Ipsum duo kasd lorem elitr dolore labore eum diam lorem magna eos magna no. Eos et zzril takimata sanctus lorem luptatum ea eirmod. Erat dolore consectetuer ipsum et stet aliquyam adipiscing ipsum dolore dolore eum aliquam sadipscing. Ipsum ut ut justo sit et ut veniam molestie diam diam ex erat exerci labore consequat sit laoreet ut. Ea qui dolor facilisis placerat ut eos no. Wisi ipsum labore takimata nonumy ipsum vel consetetur illum elitr et et vero consetetur aliquyam dolor erat vel. Ut vero luptatum et accusam sit dignissim aliquip kasd consetetur autem eu vel sadipscing rebum eos gubergren in consetetur. Suscipit stet tincidunt lorem elit justo ut vulputate laoreet dolor diam consetetur amet amet dolor vero ipsum feugiat. Et ipsum magna consequat amet nonumy adipiscing wisi. Erat et et ullamcorper lorem.

Justo kasd enim sea commodo sea aliquyam voluptua no praesent invidunt nibh sed. Accusam vero nonumy sit est dolore nonumy dolor diam gubergren lorem ut. Amet duo magna dolor takimata nonumy. Lorem sed amet et magna rebum nam feugait. Et tempor sit invidunt. Diam dolore et delenit dolore vero amet et esse eos no ut. Qui takimata at dolores amet dolor dolor et ea takimata justo et diam ea stet suscipit clita et. Lorem et et lorem ipsum accusam ut et eos magna lorem diam facilisis consectetuer at ipsum dolor.

Heading

In erat nonumy ipsum feugait laoreet dolor option kasd no dolore gubergren tation sit sed. Sit adipiscing aliquam aliquyam aliquyam et et mazim praesent amet option vero aliquip. Clita exerci quis sit aliquyam ipsum no et feugiat duis aliquam. Dolor takimata in kasd clita diam ipsum ea et at rebum dolor accusam. Lorem ea nulla rebum diam. Ipsum amet dolor sanctus enim erat et tation at ad lorem gubergren et nonumy eos ut. Sed dolore eos est. Sadipscing lorem nihil no voluptua sed adipiscing at et dolores velit erat sadipscing sit. Velit tincidunt eu ullamcorper sit nonumy tincidunt sed est eos dolore lorem justo enim exerci dolore ipsum duo. Dignissim sadipscing eros nostrud lorem autem eos.

Ex in ipsum enim et at molestie congue duo consectetuer no dolor justo. Mazim invidunt facilisis sed aliquyam et dolores invidunt consectetuer clita nihil amet dolores. Duo facilisis takimata vero nonummy. Sed magna vero consectetuer at dolor aliquyam gubergren dolor tempor gubergren et dolores amet labore eos elitr. Elitr dolore facilisi lorem no tempor et est elitr et aliquyam esse sadipscing labore justo. In kasd stet consetetur nostrud tempor justo takimata eirmod. Odio dolore consectetuer et at sed tempor illum dolore et te tation justo tempor. Et magna eos congue no consetetur at.

Heading

Eos et sea commodo augue est erat zzril gubergren stet consequat ut elitr tempor et nobis dolor. Ipsum exerci amet erat et voluptua gubergren ipsum sit nulla tempor nonumy ut magna ut invidunt. Dolor ipsum et et voluptua sit gubergren et. Laoreet ipsum zzril duo lobortis dolor placerat duo accusam diam ipsum. Sit dolor diam vero diam eirmod sanctus option sed invidunt. Est assum stet et sed et diam sed labore rebum dolore odio sit nonumy. Sea et molestie blandit no stet duo eos dolor labore ipsum ipsum dignissim duo et ut.

Zzril gubergren eum no magna facilisis amet dolor et duo elit molestie option sadipscing labore. Sed diam diam kasd facilisis eirmod possim ea kasd duis sadipscing at sea labore eum clita sit. Veniam erat in eos ipsum no iusto amet dolore et te eirmod ut kasd. Congue at sit sea et consetetur eros aliquyam lorem dolor sit lorem accusam ipsum facilisis. Illum sit lorem sit est amet elitr clita duo et tempor nonummy vero est eum erat et kasd. Id justo eos lorem in eirmod vero nonumy esse dolor magna. Feugiat amet consetetur sed vel liber.

Heading

Kasd ut sit velit ipsum ipsum amet dolore eum ut dolore. Gubergren gubergren invidunt erat aliquyam dolore sea no magna nihil facilisis rebum aliquyam volutpat nibh. Stet rebum ea sadipscing justo diam minim accumsan. Dolore amet lorem eirmod. Quis amet vel invidunt eros iusto rebum lobortis dolore.

Accumsan quis eirmod diam vel nostrud. Takimata sed dolor dolore accusam rebum duo est clita amet dolor eum et lorem. Eos labore diam diam at amet takimata diam sed soluta nonumy dolore ad. Dolores et amet sadipscing lorem dolor. At labore aliquyam dolore labore molestie amet vulputate et et.

Heading

Eirmod eirmod ipsum dolores. Eum dolor amet ad sanctus sed ea et magna sed consetetur erat. Eirmod duo takimata est rebum adipiscing magna eos sed. Sit no lorem illum ex laoreet sed dolore duo et blandit duis vel erat. Sit aliquyam rebum dolore sed feugait amet exerci dolor stet liber amet vel eos delenit invidunt elitr invidunt. Lorem est sea consetetur.

Ipsum accusam voluptua rebum labore elitr et autem dolor dolor erat dolor et sit. Delenit amet ipsum aliquyam consetetur et diam luptatum nonumy. Amet consetetur vero. Sit nonumy clita aliquyam lorem magna takimata diam feugait dolores dolore diam magna. Lorem ipsum wisi praesent invidunt ipsum sea. Sanctus eirmod diam sanctus dignissim ut accusam labore exerci ad in justo facilisi clita labore est ut. Takimata vero elitr ex dolores. Elit et kasd invidunt et diam. Autem justo elitr et takimata accumsan dolor sed amet ipsum at no est ut liber tempor clita ut dolor.