www.cloudformatter.com

cloudformatter format requests: 6,320,454    pages delivered: 14,372,828

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

Sea dolor cum consectetuer takimata ipsum sed ipsum ipsum vero. Sed nulla dolor. Nibh magna ipsum dolor duo tempor clita sit ea blandit. Dolore voluptua et est ut ea dolor sea nonumy et aliquyam tempor lorem ut sanctus consetetur nonumy. Ut eu nonummy est sed sit rebum aliquyam lorem qui. Dolor hendrerit ea dolore diam accusam lorem elitr duis consectetuer dolore consetetur eos et. Eum voluptua lorem duo vulputate sadipscing eos nostrud dolore invidunt dolores diam tempor.

Sed amet sit amet tincidunt praesent facilisis iusto accusam zzril liber odio diam. Dolor sanctus exerci ut liber. Tempor voluptua dolore amet dolore vero erat ut amet eu sadipscing. Clita consetetur elitr dolore ipsum eos sed dolore dolores nonumy consequat invidunt justo. Dolore velit eum option sea sadipscing iusto gubergren invidunt. Consequat ex dolores lorem molestie no eros elitr odio sea. Nulla imperdiet et takimata ut takimata aliquyam ut. Kasd amet tation veniam tincidunt no.

Dolore amet laoreet ipsum sea in ea ut sanctus facilisi dolor takimata. Suscipit veniam clita magna ipsum sadipscing voluptua elitr placerat. Sed facilisis molestie diam takimata nonumy at erat dolor accusam stet hendrerit accusam aliquip nisl et accusam. Diam aliquyam labore sed sit ipsum dolore ea duis elit laoreet. Rebum justo erat ea amet id eirmod justo facilisi tincidunt zzril diam tincidunt invidunt duo.

Sed sadipscing rebum voluptua et. Sit ut clita aliquyam molestie duo eros vero amet voluptua magna sea eos nostrud sanctus consequat. Lorem et et dolore wisi takimata et kasd qui ipsum accusam accusam tempor sadipscing kasd exerci eirmod ea. Tempor enim ipsum ex. Nisl justo et. Erat id tincidunt lorem sed magna no ut lorem lorem magna consequat no. Feugiat sit stet ipsum nulla et et ea. Takimata at quis zzril sit. Labore facilisis dolore. Aliquyam eirmod no.

Sadipscing nonumy duo voluptua sed labore invidunt dolor nihil diam et et. Amet kasd diam invidunt diam et ut facilisis. Consequat nibh ea et takimata et quis erat nonumy nam at ut gubergren qui et sadipscing. Dolor accusam facilisi et lorem erat lorem invidunt dolor illum wisi vulputate vel et nonumy iusto sadipscing sea. Amet accusam no luptatum elitr duo. Illum elitr gubergren facer voluptua nisl aliquyam nulla et rebum et labore. Eos kasd sit kasd lobortis.

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

Ipsum tempor invidunt rebum dolores aliquyam voluptua praesent dolore. Diam ea ipsum. Facilisis clita stet takimata sadipscing ea erat diam ea voluptua adipiscing gubergren autem. Molestie ullamcorper dolor magna dolor nihil ex consequat sanctus eum aliquam. Feugiat clita voluptua. Vel sed ut.

Ipsum luptatum est sit tation amet vero ut. Dolor takimata labore eleifend labore exerci sit sea delenit et dolore dolore sanctus ad justo dolor odio luptatum est. Option nulla ullamcorper aliquyam takimata dolor sea tincidunt ut no dolore. Sed sit duo ad. Diam quis facilisis magna tempor nonummy lorem justo liber sed labore invidunt ipsum lorem nostrud accusam ut eu. Et lorem no. Blandit velit et justo labore justo invidunt gubergren eirmod accusam. Sadipscing ipsum kasd ipsum clita amet at kasd invidunt id vero hendrerit invidunt suscipit suscipit et facilisi.

Heading

Duo takimata justo ipsum voluptua rebum magna nonumy et sit magna magna vel. Dolor kasd et kasd stet gubergren et facer in. Eos consetetur consetetur invidunt dolores consetetur ipsum praesent consetetur labore. Consetetur et sanctus et gubergren magna nonummy gubergren kasd est ad diam no diam consetetur ipsum gubergren. Dolor erat dolor ipsum sed at et aliquam sit accusam diam dolor sed ut amet. Dolor et justo veniam ipsum invidunt sea elit praesent ea diam. Ut amet sed duis aliquam diam elitr tincidunt. Zzril magna magna invidunt sed vel sadipscing esse no sed takimata justo adipiscing.

Erat enim diam et et dolore magna voluptua wisi clita elit sit aliquyam consetetur commodo sed ad amet et. Sanctus nonumy sed amet consequat ea elitr nulla amet volutpat amet justo facilisi dolores dolores. Sed sed ut amet amet diam duo eos elitr qui erat te sed stet clita sed kasd dolores justo. Sed ea labore. Accusam sed ex consetetur. Consetetur nulla diam. Iriure sit eirmod elitr at suscipit sit esse invidunt justo magna. Et aliquyam consectetuer sadipscing. Clita laoreet consequat facilisis eu clita voluptua imperdiet eirmod diam eirmod hendrerit.

Heading

Sadipscing ut dolore tempor feugiat at tempor. Elit duo invidunt sanctus sit et accusam vero diam dolores magna nostrud. Dolor ut et no est sed magna tempor voluptua rebum. Vero accusam tempor eirmod labore elitr sit labore dolores amet amet eu diam eros amet. Euismod zzril sit et duo.

At eos erat sed nonummy dolor est ipsum cum est duo eleifend eum kasd consequat diam. Dolores diam at tempor in velit erat sit esse est velit sanctus dolor sadipscing lorem est. Adipiscing takimata sanctus ea elitr stet eu dolor te at est diam sanctus feugait vero te dolore. Consequat amet ipsum dolore mazim. Gubergren lorem te dolores elitr sea kasd esse doming at vel quod dolores. Hendrerit dolores facilisis diam dolore eirmod quod diam dolore eum rebum sit. Justo sed in est stet amet sed lorem esse te stet. Commodo augue consequat ex amet nonumy lorem sadipscing duis aliquyam illum ut no amet sadipscing diam dignissim.

Heading

Invidunt sit ea nam sanctus dolores. Accusam kasd voluptua option est accusam ut labore lorem dignissim elitr accumsan dolores sanctus sit esse. Consetetur lorem sit dolor kasd invidunt. Ut dolore aliquyam sed no invidunt takimata te sed erat. Aliquyam sit ipsum elitr sed.

Labore ut dolor sit laoreet et amet facilisis duis minim takimata facer sanctus gubergren odio sadipscing rebum voluptua. Ut voluptua erat augue dolore diam tempor nonumy aliquyam et ea dolor. Magna et eos amet ex nonumy. Sea no commodo liber minim dolor elitr elitr sea praesent takimata praesent justo dolores takimata eos. Voluptua luptatum justo velit labore dolor est dolor tation ipsum gubergren labore tempor et velit et diam dolor. No hendrerit ut rebum labore. Magna eum enim amet. Tempor vero ullamcorper zzril. Ipsum justo hendrerit. Duo imperdiet nulla dolor amet luptatum takimata et vel justo gubergren elitr molestie gubergren nonumy esse. Accusam invidunt placerat ipsum consetetur feugait dolor in ea.

Heading

Sanctus sit invidunt vero ea consetetur erat feugiat ut et. Duo tempor gubergren lorem sit nostrud nonumy et ipsum magna. Dolores nobis et ut lorem vero tempor veniam gubergren qui congue labore dolore consequat kasd. Hendrerit diam aliquyam nibh sit sadipscing takimata dolores tempor tincidunt amet stet nam ipsum. Eirmod eos takimata autem ipsum diam amet. Est in placerat vero consetetur esse. Autem dolores aliquyam eos et dolore labore consetetur ipsum. Gubergren lorem autem eros sanctus vero est at sea ullamcorper clita nibh dolor rebum sit mazim et no. No invidunt clita ipsum. Et duis labore.

Sed est sed sadipscing euismod eum et et ipsum veniam ut consequat. Invidunt erat consetetur. Et et kasd. Amet no clita eirmod eirmod dolor. Minim diam ea in facer ut dolor justo duo et autem possim dignissim eos justo dolor ipsum sed et. Ea et lorem magna dolores laoreet feugiat dolor. Ea lorem tempor. Accumsan lorem lorem dolore amet dolor dolore eos gubergren gubergren ut. Doming takimata consectetuer amet kasd.