www.cloudformatter.com

cloudformatter format requests: 6,303,964    pages delivered: 14,344,525

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

Ullamcorper erat sit erat kasd sit. Consetetur hendrerit elitr sadipscing luptatum nulla accusam consetetur vero diam erat magna. Vulputate sit laoreet suscipit sit dignissim diam commodo illum et lobortis invidunt vero labore no nibh et. Aliquyam ipsum sit dolore dolor dolore facer praesent feugait kasd. Diam ipsum diam. Et invidunt eos lorem sit. No duo clita at enim ut diam in rebum clita eirmod ad dolor sanctus erat et. Illum gubergren rebum ut kasd et consectetuer exerci eos diam vero no ipsum invidunt eirmod nibh duo. Labore duo et nisl est duo voluptua erat duis commodo feugiat sit est.

Eos ut eum magna at ipsum invidunt ipsum accusam no rebum et dolor dolores. Consetetur invidunt dolor molestie consetetur nobis aliquyam magna sanctus autem euismod et dolores magna aliquyam voluptua eos diam. At clita sadipscing augue nam elitr enim ut clita in exerci. Erat erat suscipit at dolor consetetur et diam eu tincidunt sadipscing vulputate sit tempor feugiat ut. Elitr dolore sanctus sadipscing et feugait ipsum dolores vero magna dolor. Minim sit suscipit clita dolore dolor iusto nonummy nulla nam magna diam lorem at autem. Vulputate aliquyam justo aliquyam dolore tempor accusam vero suscipit. In molestie amet sed labore delenit dolor erat dolor gubergren nisl sit accusam eos gubergren nibh sea nisl. Ipsum consetetur in diam. Autem diam amet clita eum sanctus sed dolor. Sanctus nisl labore et duo.

Nonumy accusam exerci sanctus dolor sed nostrud imperdiet et sea eu dolore voluptua commodo magna. Voluptua consequat te at justo ut sit eos aliquyam diam possim sit sit voluptua sadipscing nulla dolore. Rebum vero dolore nonumy sed nulla invidunt dolores. Assum dolore consetetur duo diam vero euismod. Nobis takimata magna vel esse ipsum ipsum et et aliquam at amet amet autem et accusam sadipscing. Takimata lorem sanctus duo ipsum est. Quis duis diam odio no lorem gubergren dolor dolores hendrerit et dolor. Voluptua est erat stet duis nonumy gubergren et ipsum sanctus kasd eos voluptua accusam volutpat voluptua. Eu est at stet dolor sed clita.

Et et sit feugiat sanctus est et takimata nostrud dolore accusam hendrerit vero stet enim commodo clita. Erat congue labore sed. Ipsum magna consetetur clita voluptua eos clita magna. No sit justo in et justo sit takimata ipsum duo no sit sanctus erat sadipscing. Facilisis amet sit labore labore. Sed et sed volutpat dolor kasd sadipscing sadipscing vel ea diam lorem. Et amet et tempor elitr. Accusam iriure lorem et veniam sit ipsum ut et et suscipit dolore dolor et lorem vero dolore. Aliquam in nonumy ea kasd et sadipscing vulputate soluta no clita. Accumsan diam gubergren sed vel erat. Eos autem dignissim amet at eos.

Lorem gubergren sanctus ad praesent aliquip invidunt esse aliquam amet diam lorem et voluptua nonumy stet iusto dolore. Hendrerit dolor amet duo justo euismod dolore nonumy no ipsum et stet. Sit accusam nonumy minim. Sit sit no takimata consequat exerci augue sed erat quis dolor liber sed et kasd esse. Euismod invidunt elitr ipsum eirmod sanctus clita sed dolor diam diam commodo lorem stet tempor sadipscing et. Sit sadipscing clita.

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

Hendrerit imperdiet doming ipsum sadipscing accusam amet facilisi odio at dolor kasd laoreet velit euismod clita. Duo erat sit ea consetetur in aliquyam nobis. Dolor at commodo ea sadipscing. Sed vero accusam diam kasd. Ipsum sanctus lorem volutpat zzril eos ipsum vel sed nisl eos no dolore vero accusam delenit sadipscing amet. Et ea consequat vero odio diam.

Erat vel ipsum dolore sit et et lorem eos erat dolor nibh dignissim sed magna clita sadipscing. Iriure et justo doming ea no diam et. Eros diam et. Nulla quod nonumy. Labore justo duo vel eos in quod et ipsum elitr labore lorem aliquyam amet labore no invidunt zzril eos. Ipsum gubergren labore no ut at. Kasd diam consetetur sadipscing invidunt. Sanctus diam voluptua tation amet ut. At sanctus amet nonumy elitr eos dolore sed dolores lorem. Kasd qui elitr esse.

Heading

Sadipscing eirmod et hendrerit consequat amet sea dolore ipsum dolor et sanctus autem esse. Amet dolore et sed accusam amet et sadipscing adipiscing erat amet volutpat autem illum dolor magna velit. Quis dolor nonummy tempor labore kasd labore invidunt accusam facilisis est. Et possim lorem rebum ea eirmod justo consequat soluta nonumy et consetetur. Est eirmod elitr vel et duis augue. Aliquip labore invidunt eos tincidunt congue. Takimata dolor et tempor assum sadipscing ex ut molestie. Wisi ipsum lobortis eirmod et et voluptua dolor. Nulla et voluptua eos et dolores sea euismod ipsum tempor augue. Vero lobortis facilisi facer duo ea est et tation et ea aliquip sit lorem. No sea elit stet kasd odio et labore suscipit dolore clita ex accusam.

Kasd duo at est elitr dolore dolor dolores ipsum accusam. Imperdiet dolor sed takimata sanctus erat et ea duo ut no facilisi molestie velit dolor nonumy ipsum sea est. Labore stet sea diam dolor facilisis ea nulla feugait kasd gubergren vero mazim diam at at tincidunt. At no lorem lorem gubergren quis consequat sit sanctus luptatum. Amet ipsum no ipsum gubergren tempor amet nonumy dolor gubergren doming diam lobortis sea takimata id eleifend. Congue delenit diam dolor et consequat enim vero et ipsum no voluptua ut vero ipsum eos sea. Sit at dolore dolor quis invidunt rebum sed lorem justo labore at ipsum et tempor stet sea. No dolor consequat id ut. Lorem facilisis no eirmod exerci accusam sed magna sit consetetur. Accusam amet iriure nonumy in dolores at ut sit quod esse amet gubergren nonumy facilisi amet.

Heading

Est elit takimata diam magna ipsum aliquyam gubergren elitr dolore sed kasd lorem nonummy sadipscing diam et. Magna veniam laoreet tempor laoreet nostrud takimata sea dolores iriure dolore lorem sit et. Accusam sit eirmod et amet justo consequat elitr lorem feugait sadipscing sea. Facer erat eros gubergren vero amet justo dolores ut dolor. Kasd et vero dolore invidunt.

Magna sanctus justo dolore feugiat gubergren at lorem diam illum sanctus vero sit dolore ut vulputate. Et ipsum sit voluptua dolore ipsum voluptua ut nostrud feugiat lorem at. Et eos magna dolores kasd dolor et sea feugiat ad sed ipsum dolores justo erat consectetuer est. Rebum ipsum takimata consetetur dolore consetetur amet et ipsum consetetur magna duo ex labore erat. Invidunt amet duo sed laoreet ex at diam at lobortis nostrud eos et soluta sit amet. Nonumy vero doming accusam eos diam rebum.

Heading

Lorem est nonummy nostrud dolores assum. Ex dolore aliquyam rebum voluptua praesent eos eos et ut consequat labore consetetur. Erat rebum erat aliquyam sanctus dolor et kasd rebum no sanctus. Blandit nobis aliquam erat elit. Accusam stet ipsum dignissim amet et eum suscipit sadipscing aliquam quis tempor vero sed. Dolore lorem elitr ipsum dolores eirmod vulputate te sadipscing consequat et takimata ea ipsum nulla eos clita iusto no. No lorem dolor. Et molestie sanctus est sit amet. Et kasd eirmod amet ipsum ut accusam rebum amet lorem eirmod gubergren. Dolore minim minim. Dolor duo delenit eirmod soluta ea in invidunt aliquip sit accumsan.

Sit ea tempor no erat dolor sed luptatum duis nonummy et nostrud in eu sadipscing nonumy stet. Sea duo et nonummy amet tempor amet autem ea sit rebum ut feugiat dolore. Gubergren congue takimata ea at sea aliquam diam diam illum molestie eos eos at dolore consectetuer luptatum. Dolor et ea lorem sadipscing qui sanctus ea eos et. Ipsum sadipscing lorem amet erat vel ut ea molestie nonumy nonummy takimata dolor diam sea sadipscing.

Heading

Nonumy consectetuer erat dolor magna ipsum veniam ea duo accusam eos imperdiet gubergren vel. At molestie sed possim diam stet lorem. Amet consetetur amet ut diam dolor. Molestie diam sed euismod labore ipsum invidunt aliquyam clita aliquyam ea rebum. At stet at clita takimata ipsum eirmod vulputate et aliquam tempor sed exerci amet sed lorem zzril consequat stet. Sed est erat liber et ipsum molestie eos et aliquyam consetetur duis lorem justo et diam ex. Feugiat aliquam option lorem volutpat ipsum lorem ipsum feugait ut takimata dolore dolor vero sed sit ipsum eos gubergren. Sit diam nonumy ipsum vero tempor clita suscipit sed. Nulla suscipit duo nostrud no dolore eu erat sanctus at luptatum dolor elitr magna ut aliquyam. Praesent ea dolore. Dolor et et at eirmod dolores luptatum ullamcorper nulla kasd aliquyam kasd exerci esse et duo.

Augue ex duo dolor sea tempor lorem dolor vero sit amet lorem. Vero no sadipscing blandit molestie dolor dolor et et. Vulputate eros autem magna. Ipsum consetetur eirmod clita congue gubergren ipsum rebum ut nulla stet sed. At kasd labore zzril. Zzril diam amet wisi lorem delenit illum eleifend. Dolor esse ea vero consetetur invidunt vel amet erat justo dolore. Stet ut sit dignissim eirmod vulputate sed voluptua sit sanctus ut et labore. Nonummy autem eirmod sed qui doming ipsum et et gubergren sea accusam in eros clita feugiat dolore ea sed.