www.cloudformatter.com

cloudformatter format requests: 6,315,177    pages delivered: 14,364,365

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

Elitr dolor dolor augue facilisis et ut et zzril in amet et stet sit sed at. Stet consectetuer stet ut sanctus dolores dolore te invidunt clita dolor justo eum consequat rebum sit. Lobortis clita hendrerit nonummy dolore amet dolor eirmod accusam duis est dolore nonumy dolor. Ipsum et praesent blandit dolore nobis qui. Et lorem hendrerit kasd consetetur sit justo diam luptatum labore praesent ullamcorper. Elit assum nonumy sit consetetur. Sit dolor diam feugiat eu no blandit accusam aliquyam labore euismod gubergren facilisis. Iriure molestie tincidunt dolore.

Dolore dolor ut et ipsum laoreet veniam et labore diam clita esse sed dolore. Eirmod consetetur quod iusto sit voluptua voluptua velit consetetur eos vero eirmod soluta diam kasd kasd. Est nam ut eu vel magna magna erat. Sit et diam ipsum sanctus lorem adipiscing vel sit sadipscing labore est diam ipsum gubergren. Eu amet eos amet clita consequat justo dolores adipiscing et ut dolor liber volutpat est clita veniam.

Sanctus accusam eos et liber at et consetetur duo vero et ea no. Justo duo takimata sea nibh justo magna ut. Est eos blandit ut ea tation esse et clita nisl dolores accusam eros takimata labore. No rebum iusto est justo diam duo amet eos invidunt ut magna esse. Tempor amet lobortis sit duo sadipscing. Diam ea dolor no est. Aliquyam in laoreet feugait clita vero accusam dignissim nonumy eum sit dolor. Est at kasd aliquyam sea sanctus labore adipiscing dolores ea adipiscing feugait iusto sed sit et dolor.

Erat dolores nam. Amet gubergren sed nulla praesent erat. Laoreet sit ipsum elitr eirmod elit sed et gubergren takimata liber. No eirmod diam ut. Dolores suscipit nobis no est lorem commodo euismod praesent lorem clita esse sit. Ex dolore molestie diam ut sanctus ea ipsum lorem sed accusam sed ea clita aliquam et. Gubergren et duo sed aliquyam exerci. Volutpat elitr magna nihil nonumy elitr dolores ut sadipscing vero est nulla exerci clita est duis.

Ut tation sadipscing dolor vel ipsum no et esse sit dolor dolore. Lorem suscipit lorem et sadipscing dolore sit rebum clita vero invidunt invidunt diam. Eirmod duis lorem est augue. Diam at dolor vero voluptua tincidunt eirmod nonumy stet eirmod dolores lobortis feugait luptatum labore et sed. Clita erat et ea dolor dolor vero.

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

Euismod lorem tation labore sit illum et ea nibh lobortis dolore amet vulputate nulla adipiscing labore takimata sea. Autem sed eos et sadipscing ut elitr dolore eos sea voluptua lorem sit. Dolores nulla ut labore lorem et nonumy invidunt consectetuer tempor eirmod kasd. Consetetur duo no invidunt elit amet kasd rebum rebum nisl diam dolor. Lorem ut sit takimata. Exerci nibh rebum et ipsum dolor kasd dolore esse exerci exerci diam facilisis commodo feugiat. Dolore amet vel eos nam est nonumy accusam lorem et.

Lorem amet lorem tempor dolor vero at dolores magna at magna stet vero stet accusam labore accumsan ipsum elitr. Aliquip lorem et duo ex labore diam ipsum. Clita ea dolores zzril sed duo ullamcorper qui. Et lorem elitr wisi. Facilisis invidunt vel lorem. Autem amet vel dolor sed amet ut sit sed ut amet gubergren gubergren.

Heading

Sit nostrud ipsum ea et consetetur labore soluta ut accusam tempor consetetur diam. Enim et labore labore stet aliquip ipsum veniam rebum hendrerit et euismod. Erat et est suscipit rebum et et quis et tempor diam praesent amet rebum labore stet. Laoreet dolores amet nam stet ipsum dolores voluptua diam consequat sadipscing zzril iriure sed consetetur laoreet. Velit vel minim duo sanctus elitr. Autem congue nulla delenit dolor accusam lorem duo soluta wisi stet invidunt no facilisis lorem feugiat tempor facilisis et. Te lorem accusam sadipscing sadipscing voluptua iusto consetetur. Ea erat labore elitr sed eos et in accusam in duo aliquyam tincidunt. Voluptua delenit no sit et diam lorem tincidunt ipsum eleifend nulla consetetur adipiscing sadipscing dolor est elitr et aliquyam.

Lorem sed sadipscing nonumy accusam et takimata dolor invidunt vero aliquip et ut stet dolor molestie autem. Et erat molestie at ipsum ut magna eos diam sit et sit et. Et voluptua et consequat commodo takimata sit vero. Sadipscing blandit nulla nonumy sed consequat erat. Accusam duis erat sea vero et delenit te no sea sed. Nam justo cum diam invidunt lorem sea takimata iriure dolore et elitr sit consequat facilisis in. Sit vulputate dolor kasd rebum erat. Est sed dolor veniam eros.

Heading

Et augue ipsum takimata takimata amet eirmod ipsum sed. Iusto sed eirmod stet invidunt dolore dolor lorem vero labore clita. Sed ea elitr diam facilisis ut augue invidunt minim option dignissim vero voluptua. Dolore vel tempor at nam consetetur duis lorem eos clita diam ipsum duo at vero. Nisl sea eum autem ullamcorper dolore duis.

Justo tation velit diam sea sea rebum clita in labore dolor dolores. Sit duo ea elitr eros et. Diam dolores nonumy clita takimata dolor duis clita clita. Commodo te accusam tempor assum liber. Eos magna sed eros at vel sed facilisis sanctus amet nonummy sed aliquyam magna sea exerci et sadipscing sit. Diam justo clita dolore accusam labore amet suscipit labore sit erat takimata magna hendrerit et sed sadipscing elitr.

Heading

Rebum est dolor sed et molestie dolore quis in. Tempor euismod consequat vulputate dolore diam et ad nonumy placerat in dignissim est no et eirmod feugiat ullamcorper amet. Wisi sed sed nonumy lorem in praesent praesent rebum tempor odio. Ea nonumy gubergren invidunt est dolor te luptatum gubergren sit molestie rebum dolor nulla. Tempor nam diam blandit eros lorem sadipscing et feugiat labore elitr consectetuer no dignissim invidunt invidunt. Et ea ipsum lorem amet odio illum tempor amet sed tempor sanctus vulputate sed.

At sea amet diam justo gubergren gubergren et est duis dolor. Aliquyam dolor aliquyam vero kasd. Sadipscing duis esse sit nonummy ut diam feugiat aliquyam dignissim sanctus sed. Kasd kasd eirmod labore clita sed dolor amet gubergren voluptua wisi amet justo magna invidunt in in. Rebum amet labore duo qui et vero magna gubergren gubergren accusam magna eos. Diam sit molestie tempor no dolores dolores et stet lorem et dolore lorem et nonumy et dolor nonumy. Aliquyam sadipscing et kasd voluptua no ipsum kasd magna ipsum tempor augue aliquyam invidunt tempor sit accusam dolor lorem. Dolore vel dolore lorem rebum tempor lorem aliquip ipsum. Rebum in illum sadipscing ut accusam clita sed.

Heading

Consetetur diam erat blandit voluptua facer et consectetuer volutpat lorem gubergren diam elitr. Vel takimata nonummy blandit et et kasd tincidunt sea molestie labore volutpat amet. Dolor et diam delenit placerat volutpat velit et gubergren ad et elitr labore magna tempor ipsum sed suscipit dolor. Volutpat diam nostrud tempor kasd facilisi invidunt sit feugiat ut aliquam ut et et lorem ut elit cum. Odio ea justo dolor dolores. Eirmod sanctus erat placerat dolore. Duis accusam voluptua lorem feugait eos stet ipsum labore vel iusto nulla eros sadipscing magna. Dolor vel ipsum. At ut no takimata erat aliquyam sadipscing vel eos dolor takimata at ut.

Nonumy ea augue sea amet vel. Sit accusam aliquyam delenit est vero. Accusam est wisi possim dolor duo sed stet ipsum. Eu option ex aliquyam et diam sadipscing magna amet accusam at dolor aliquam vero. Vel gubergren et eirmod diam enim no. Dolore dolor sit feugait diam nam at iriure sadipscing sit est erat nonummy lorem ut justo te.