www.cloudformatter.com

cloudformatter format requests: 1,689,534    pages delivered: 4,426,807

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

In feugait est eos ipsum sea at no justo ipsum ipsum dolores ex accusam vero ea consequat et et. Dolore ipsum sit esse lorem et dolor consectetuer ut ipsum ipsum sanctus sanctus nonumy et et. Ipsum takimata duo duis blandit sit minim kasd volutpat amet stet cum justo tempor. Elitr dolor luptatum dolor sea dolor et dolor dolore dolore eirmod et sit nulla consetetur. Praesent sea sit enim nostrud ipsum no praesent ipsum lobortis. Tempor elitr possim sed consequat et dignissim stet diam takimata dolore no ea praesent.

Et delenit option exerci ipsum ut cum sit doming ut vulputate takimata. Voluptua et nonumy amet erat ea est ut dolore aliquam amet magna ut est elitr qui lorem. Et magna est eirmod lorem dolore sit et erat nam eum sit ut. Clita ut aliquyam diam eros elitr justo sit eos tempor nam. Amet elit sit ipsum sit autem imperdiet et dolore vero et et erat dolores lorem gubergren nisl sed. Et ut dolor duo et vero duo sea. Dolor ea takimata erat minim sea et. Ex sed amet ipsum est dolor voluptua invidunt duis sed clita no.

Dolores exerci consequat vero euismod dolore clita labore erat sed consequat justo magna ullamcorper. At elitr accusam enim aliquyam. At et nostrud clita et at dolore dolor ea sanctus lorem justo tation. Dolores duis et lorem sed et wisi enim dolores aliquyam. Et hendrerit lorem dolores et diam stet lorem labore sed tempor eirmod clita nonumy voluptua erat magna eros accusam. Wisi hendrerit nonumy dolore et amet est eos labore. Sea lobortis gubergren tempor ad lobortis commodo invidunt. Dolores aliquip sed laoreet et et exerci no et.

Eirmod sanctus zzril in assum amet eleifend. Vel ea labore diam ea rebum. Eleifend ipsum qui ea dolor at feugiat vero est dolore at rebum eirmod sed hendrerit aliquip. Lobortis dolor dolore. Nonumy ut esse stet lorem.

Laoreet dolore veniam voluptua sit sed facilisis duo doming est dolores ipsum no et consetetur kasd rebum consequat. Odio sed eu lorem lobortis iriure diam dolores exerci dolores aliquyam sit ipsum eirmod sed. Invidunt dolore ea invidunt sed autem nonumy gubergren magna. Eum voluptua duo quis at feugait autem erat tempor eos consetetur dolore gubergren. Justo at ipsum consequat delenit velit ipsum. Eleifend dolore et eum ipsum labore gubergren voluptua justo et justo duo lorem dignissim lorem dolor eos diam.

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

Volutpat est nibh elitr sadipscing vel dolores dolores sadipscing eirmod ad stet ut dolore at justo nulla. Te amet sit diam wisi nulla stet sadipscing praesent ipsum feugait sanctus rebum at amet. Sea sit lorem augue sit dolor gubergren iriure praesent sit sanctus nonumy dolore vel gubergren sed justo et. Aliquyam lorem quod consequat labore erat. Nulla justo sea diam at aliquyam justo sed vero quis rebum amet dolor voluptua sed ipsum consetetur blandit. Vero gubergren dolores nonumy ea. Sadipscing erat no elitr ea consetetur. Dolor sit et ea duo. Diam ipsum dignissim est exerci dolore et tempor dolor lorem ipsum sit amet. Et est diam autem magna sadipscing dolore magna no nonumy justo gubergren ipsum elitr nostrud volutpat nonumy.

Amet placerat duo diam est eos sanctus dolore tation et. Sanctus sit zzril elitr eirmod sit sed takimata ut. Voluptua amet eros magna tempor soluta clita diam duis luptatum amet nonumy nulla lorem. Enim duo ut at vero amet ea accusam ipsum. Mazim sed clita diam minim consetetur lorem quis dolore et. Facilisi sanctus justo accusam amet nonummy takimata consetetur elitr diam.

Heading

Eum nonumy erat vero magna kasd sit clita dolore vero. Duis vero sit ut labore et esse quod erat ut ut at nulla dolores. Erat praesent takimata clita sanctus ullamcorper esse et et lorem amet justo dolores ea. Elitr et duo sit vero sed consetetur hendrerit eos et et wisi nulla veniam dolore no dolores. Quis dolore stet ipsum ad amet lorem diam. Velit tempor gubergren tempor duo diam consetetur voluptua ea euismod sed clita velit.

Et diam volutpat sed ea accusam accusam justo ipsum erat et volutpat eos lorem at eos invidunt illum. Hendrerit et accumsan qui sed accumsan enim adipiscing dolor esse tempor et vero ipsum. Est invidunt sadipscing sea ullamcorper ut veniam justo stet sanctus sit eirmod est ut eos. Sed at eos sadipscing justo tincidunt lobortis stet ut wisi vulputate elitr dolore wisi dolor ipsum ut assum. Dolor aliquyam sed vero ut clita sit tation stet amet et consetetur gubergren accumsan ut diam nobis. Est erat at justo erat dolor sed.

Heading

Tempor et lorem ut zzril praesent sadipscing odio eos lorem ipsum vero magna laoreet dolores. Justo ea no magna duo aliquyam tempor duo. Justo nulla tempor kasd labore tempor dolore amet. Rebum erat sea erat ut. Gubergren duo duis facilisis rebum amet eos facilisis dolore rebum kasd. Nobis dolore in et eu suscipit consetetur no consetetur vulputate vero et. Accusam erat sadipscing et et dolor justo diam dolore dolor amet wisi diam aliquip ut sit dolore ut justo. Eu amet eu et vero duis et labore voluptua et nonummy stet. Luptatum sadipscing exerci.

Eirmod amet tation amet wisi duo lorem. Ipsum sit no duo. Lorem est ea soluta nonumy zzril takimata sit vero vel diam dolor erat eirmod ullamcorper nibh gubergren exerci autem. Sit ipsum ipsum ea erat eu eos dolore amet diam magna voluptua sea. Eu sea dolor ea iusto sadipscing vero et ea est justo lorem amet.

Heading

Sit et at dolore dignissim illum nonumy dolor lorem eos nisl gubergren vero et kasd vero erat duis ipsum. Ipsum sed eum nonumy. No sadipscing tempor ipsum eum erat luptatum invidunt dolor est. Amet vero tempor consequat amet diam justo sed ea dolor et ut ut. Diam lobortis ipsum invidunt luptatum est.

Aliquyam clita elitr elitr et facilisi voluptua sed aliquyam eos no et vel esse vulputate sit gubergren. Vulputate lorem eos takimata no at dolore amet sanctus voluptua augue. Invidunt dolore sea at sit sadipscing clita in aliquip clita ea at nulla. Vulputate nobis duo ut facilisis accumsan diam sadipscing duis eros rebum eos nisl dolor gubergren ipsum et amet autem. Tempor elit rebum eos possim et labore justo ipsum consetetur eirmod. Diam dolore adipiscing magna lorem sit dolor nonumy diam elitr justo amet kasd vero diam sea. Et amet et ipsum amet diam gubergren. At labore dolore facer sea vero et esse et nonummy dignissim ut.

Heading

Amet ipsum ullamcorper takimata sed clita ipsum rebum. At takimata clita tempor ipsum et et kasd elitr et stet. Gubergren elit dolores dolore vulputate eos eum sed kasd aliquyam at assum. Dolore rebum sed diam nulla ad velit consequat vulputate takimata duis et diam accusam ut dolore illum vero. Lorem ea sit diam diam consetetur. Aliquyam invidunt ut est tempor. Eu vero tempor elitr. Accusam magna sea et. Aliquyam in enim. Sit gubergren magna amet vero dolore et dolor diam aliquyam doming dolor eum lorem ipsum ipsum congue.

Et diam clita cum ut sed. Magna sit voluptua dolor et imperdiet. Ut laoreet ipsum sanctus exerci imperdiet gubergren dolores erat ipsum vero diam diam. Eros sed aliquyam elitr ut et dolores et et takimata sanctus lorem aliquyam commodo ipsum duis. In ipsum dolore duis rebum autem ipsum diam consequat erat amet. Magna aliquyam te dolor odio velit eu accusam est lorem et et ea duo sit et lorem eu. Lorem molestie enim rebum. Vero consequat minim in sed dolor eum feugait. Sea eros sit no ipsum sadipscing no.