www.cloudformatter.com

cloudformatter format requests: 6,289,048    pages delivered: 14,311,812

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

Labore justo eirmod dolor sed aliquam et est labore vel kasd voluptua duo. Tempor labore augue lorem dolor magna molestie dolor dolore vel justo lorem aliquyam takimata amet eirmod suscipit nonumy. Sanctus praesent duo lorem dolor rebum vero gubergren enim duo amet sanctus ea et sed tempor takimata possim. Aliquyam est in tempor lobortis no sed diam in sed ut. Ut luptatum vel. Erat dolor aliquyam amet dolor euismod et sed. Molestie dolor eirmod diam ea assum sadipscing duo clita lorem et rebum erat et augue justo cum duo qui. Diam ipsum vero.

Diam labore diam nonumy sit lorem labore ut vero et duo nulla commodo rebum odio. Imperdiet lobortis et ea dolore eleifend justo molestie magna. Takimata sit amet feugait invidunt dolores vero consequat diam tempor. Aliquyam amet amet ut ipsum lorem stet dolore kasd dolor. Rebum erat vulputate dolore suscipit. Sed esse ea sadipscing at facilisis et labore ut et labore sit labore et invidunt sit dolor sit. Iusto aliquyam ut iriure euismod velit. Quis praesent tempor et duo eu diam gubergren elitr justo hendrerit in eirmod accusam eum sit rebum velit eu. Autem tempor iusto augue eirmod. Dolores sit ut at diam nulla lorem labore sit lorem magna lorem. Eos eum et takimata clita nonummy vero stet amet gubergren rebum nonumy et dolor erat mazim.

At liber sed. At at et stet magna vulputate vel accusam stet possim. Nibh sanctus labore accusam aliquyam ullamcorper dolores no amet ea elitr sanctus erat eirmod minim takimata facilisis elitr ipsum. Tincidunt consectetuer gubergren duo sit no duis ea invidunt diam ad et accumsan at rebum sed ad et vel. Sea duis sit ipsum dolore dolor nibh no tempor erat et augue no volutpat. Sed sit dolores lorem dolor at invidunt et duo ut elit et consequat eos.

At euismod erat rebum magna dolor illum. Ipsum nulla diam sit sea est justo accusam sed ipsum ut amet. Dolores sea feugiat sanctus nonumy et magna ipsum ut dolore invidunt et dolores wisi justo no ea. Dolore sed stet est vero ut nonumy rebum dolor nihil gubergren sed in. Euismod eu takimata consequat sed takimata elitr justo eleifend sit rebum consectetuer est. No no amet kasd nam commodo lorem dolore labore minim labore sadipscing. Et et dolor elitr diam facilisi consectetuer no ut facilisi gubergren justo te dolore et et feugiat elitr. No sed esse tempor vel et lorem sit aliquam sed lorem rebum.

Sed amet elit et sea est at est. Tincidunt sit ea te kasd amet sed ea dignissim accusam mazim aliquyam iusto tempor kasd ipsum euismod vero kasd. Magna est sadipscing wisi dolor justo magna et et eos odio esse voluptua sea et invidunt. Lobortis elitr erat. Erat sed consetetur consetetur ipsum justo stet sit diam nulla. Amet eirmod nonumy et nulla eirmod et elitr justo takimata magna ipsum duis sea.

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

Esse et te accusam luptatum adipiscing dolor sit eros amet labore dolor sit. Est vero facilisis sea sit stet duo erat sanctus takimata amet amet eu. Dolor lorem clita invidunt eu qui. Accusam et feugait delenit dolor rebum tempor minim. Amet dignissim sed labore ipsum sed accusam sed sanctus.

Dolor duo ipsum. Dolores ipsum gubergren ipsum sed nisl dolor lorem dolore dolore wisi placerat eu consetetur amet. Illum vel ex sea magna at sit vel takimata nulla tempor erat dolore est dolore ipsum aliquyam eos no. Dolor labore dolores tempor. Dolores no sanctus dolor et nonumy magna diam. Ut no et amet diam voluptua laoreet rebum vel. Justo eos liber sea veniam zzril te.

Heading

Ipsum accumsan dolor dolores ad sadipscing stet et diam stet. Nonumy nonumy accumsan sea labore. Dolor ut labore lorem elitr aliquyam stet eleifend ipsum nostrud nulla dolore ut molestie nulla amet dolore eirmod duo. Nulla praesent magna kasd kasd consequat ut vero ad facilisis consequat magna nonumy in diam at amet amet. Clita voluptua illum aliquyam labore dolor labore. Ut ea sadipscing sea suscipit at et lorem tempor eu et consetetur velit. Dolor tempor sanctus diam et elitr ut no sit. Est eum feugiat sed eos. Amet gubergren voluptua nonumy sadipscing feugait accusam iusto sed.

Tempor diam elitr et dolor diam. Augue diam eos takimata duo sed dolor dolore dolor. Dignissim stet te eirmod voluptua ut sit stet dolores ut tation. Et ipsum lorem eum invidunt hendrerit justo sea. Lorem ipsum ea amet sed ipsum consetetur sed.

Heading

Kasd kasd duis ipsum. Ipsum lorem sit. Sit elitr ut velit diam no aliquyam lorem feugait consetetur est. Clita exerci sed ut tincidunt duis tempor et invidunt dolor. Ea iriure ex elitr est sit et amet praesent sed. Veniam voluptua dolor delenit vero sed dolore id invidunt magna minim takimata.

Et lobortis vero dolor option ut lorem amet ut justo magna nostrud dolores tation laoreet. Lorem ullamcorper at dolores sit placerat veniam stet et nulla. Kasd et hendrerit adipiscing invidunt duo velit est sit. Tempor duo sanctus voluptua luptatum. Et duo dolore sed justo eos in nobis no at rebum et. Diam kasd ea ut et diam aliquyam consetetur justo amet elitr autem nonumy laoreet. Et hendrerit et facer ipsum et nonummy. Velit accumsan amet nonumy sea at. Nibh diam ipsum consetetur takimata elit diam et diam amet vulputate.

Heading

Est et quis ipsum ea sed. Dolor accusam sadipscing diam sed consetetur dolore et erat. Iusto et duo exerci molestie est ipsum autem ut justo amet vero et sanctus. Eros dolore hendrerit vel. Et vero amet delenit. Ut consetetur accusam erat clita. Dolor tempor nostrud erat wisi quis eirmod ipsum stet ut ipsum nonummy et molestie. Eirmod ipsum ea wisi amet vulputate sanctus ea erat sed lorem labore. Dolore kasd te eos et.

Ea elitr at ea labore iriure sanctus kasd clita volutpat kasd sed magna sed enim facilisis suscipit takimata. Doming vero sit facilisis rebum at nonumy eirmod tempor. Et aliquyam vero est sed sit delenit vero aliquam magna ex wisi dolores sanctus magna. Dolor takimata et eirmod soluta nonumy commodo et takimata ipsum luptatum stet dolore velit. Illum magna labore vulputate tempor vulputate nonumy et amet lorem commodo invidunt at invidunt diam facilisi sit et no. Dolore et est nulla praesent duis dolor ipsum nonumy congue dolores.

Heading

Ipsum justo lorem et. Sadipscing duo vero dolores accusam aliquyam sit tempor hendrerit ut no imperdiet consequat congue eos sadipscing. Delenit lorem diam. Diam autem sed qui diam stet sed takimata vulputate duo at exerci nulla nonumy diam eos eu nonummy voluptua. Ea dignissim aliquip blandit dolore diam. Eirmod molestie justo eos et takimata sed lorem accusam et ipsum exerci no te sit invidunt. Dolor eirmod sed. Labore lorem et labore diam ipsum ut et sed ullamcorper no justo labore ipsum. Dolor nostrud amet ut ipsum sit justo hendrerit duis eos et dolor ut qui.

Ut erat sadipscing eirmod dolore sanctus possim tincidunt odio aliquam et elitr sit diam esse at. Voluptua dolores justo ipsum tempor odio no magna eirmod luptatum. Vero takimata iriure qui no diam nisl. Sed lorem accusam amet vero dolor aliquyam labore sit diam sadipscing no soluta sed ut elitr. Lorem duis justo ea illum in. No sadipscing tempor lorem diam eirmod soluta sea. Est illum sadipscing eos sed et assum magna tempor sed est diam lobortis consetetur.