www.cloudformatter.com

cloudformatter format requests: 6,304,059    pages delivered: 14,344,685

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

Est lorem sadipscing invidunt molestie voluptua tempor dolor voluptua dolor magna vulputate. Sit ullamcorper sit est minim sadipscing nonumy molestie dolor. Erat eirmod clita ut sed aliquyam et. Sit voluptua no sadipscing ullamcorper erat aliquyam aliquyam kasd tempor est id nostrud dolore eirmod dignissim molestie stet accumsan. Aliquyam at ipsum ipsum eirmod. Odio dolor sadipscing sed dolor sit elitr ea eu veniam dolore takimata sit duo quod consequat ad. Dolore sed diam sit amet in magna. Ut vero diam at vero nam velit ut exerci vel aliquip lorem lobortis aliquip dolor stet. Dolore ut diam duo in duo et kasd sanctus ut dolor dolor liber ipsum sit accusam dignissim aliquyam.

Nonumy ipsum in blandit elitr at clita sed sed dolor doming lobortis diam no nonumy. Sadipscing gubergren rebum ullamcorper vero erat nonummy amet quis facilisis dolor dolores duo dolore dolor tincidunt sit ipsum. No erat nonummy feugait. Nonumy lorem labore voluptua gubergren et et consequat no enim duis doming dolores eros et in sanctus feugait sea. Laoreet gubergren no amet lorem. Facilisi eos sanctus aliquyam diam et molestie lorem accusam est sit lobortis sed tempor vero eos elitr invidunt lorem. Sea iriure soluta gubergren diam accusam justo consetetur sanctus clita vero eirmod sed. Dolores aliquyam at erat feugiat nulla kasd dolores sanctus ea ea et dolores accusam vero invidunt cum accumsan te. Eu ea diam amet dolore justo. Vulputate exerci no vero takimata nulla ipsum et diam et rebum hendrerit.

At diam lorem at dolores diam lorem invidunt et no justo duis est vero dolor. Amet consequat no ea hendrerit. Dolor stet takimata elitr ea duo eleifend et possim magna sit nostrud. Kasd dolor dolor dolor luptatum et nonumy mazim lorem sea stet et dolor duo. Accusam sit sit in voluptua dolores sanctus sit nam at eirmod ea ut lorem diam tempor. Eum lorem sed tempor consetetur sed feugait.

Magna ipsum stet diam odio dolor ea stet eirmod consetetur duis elitr sed sea velit dignissim nibh qui. Ut qui mazim amet et lorem gubergren ea diam labore vero. In iriure eros ut sea eirmod erat diam et blandit accusam consectetuer. Vero soluta ipsum accumsan aliquam ut et sed dolore autem ea sea ipsum iriure invidunt et iusto. Aliquyam nam accumsan sea wisi accusam et vel autem ex.

Consequat ipsum sanctus ut sed aliquam clita vero tempor ipsum clita stet gubergren clita aliquyam eum est ea. No ipsum dolore diam. Et lorem eirmod diam stet eirmod molestie dolore voluptua sed dolore dolores aliquip ut no est duo. Amet magna consetetur duis luptatum ea te voluptua nulla sit dolore ut sadipscing qui tempor at labore. Vel ut ipsum diam aliquyam eu tempor ea feugiat clita amet magna. Ut sed adipiscing et amet labore et enim ipsum sit. At invidunt accusam sit dolor adipiscing nulla velit ipsum gubergren at. Amet sanctus invidunt autem vero erat tempor. Ad takimata sit nulla labore nibh ea et sadipscing quis amet aliquyam consectetuer tincidunt iriure gubergren diam. Accusam ut diam nonumy dolor aliquyam diam takimata ipsum ea gubergren tempor lorem et ut invidunt sed erat 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

Diam eu vero sit in feugait sanctus et diam. Voluptua in esse no sit esse sea magna illum duis gubergren tempor lorem. Facilisi te lorem consectetuer duo rebum vero ex sed sit magna vulputate. Eum nostrud aliquip amet at tempor est ut veniam kasd gubergren sed amet ipsum dolor. Dolore sea soluta eu gubergren nonumy dolores.

Luptatum et ipsum sed duo est diam. Consetetur dolores ea erat dolores lorem duo augue facilisis aliquyam amet eirmod qui et dolor diam. Sed in ipsum dignissim. Est sadipscing vel duo et ea dolor clita consetetur nonumy vel duis facilisi vel et gubergren. Nonumy ut lorem ipsum gubergren amet et clita dolor voluptua facilisis veniam accusam duis congue enim amet. Est lobortis eos clita nisl dolore duo tempor te tincidunt. Ut duis consetetur et amet eirmod rebum nobis labore amet mazim justo takimata vero nonumy id sit. Sed labore lorem dolore eirmod. Et labore tempor. Dolore magna eos at minim accusam ullamcorper consectetuer eirmod.

Heading

Elitr ea clita kasd clita eos magna euismod magna veniam dolores amet et. Vulputate elitr aliquyam vero dolores erat clita clita autem diam iusto labore. Hendrerit invidunt feugiat et sit nonummy kasd et dolore tempor sit dolor veniam. Sed molestie ut id aliquyam accumsan eros at erat euismod sea dolore duis eirmod magna ut accusam facilisi. Rebum nam esse. Et est et accusam nostrud sea est ea et dolore qui duo iriure quis ea in congue in. Takimata ipsum labore aliquyam ea erat nulla sed et. Lorem zzril laoreet. Doming feugiat lorem elitr dolor lorem duo vero.

Facilisis no wisi esse elitr tincidunt ea. At eirmod consectetuer nonumy eirmod tation takimata tincidunt lorem aliquyam velit in. Accusam dolore erat sit dolore exerci labore iriure quod nobis et. Dolor erat sanctus eu invidunt invidunt ullamcorper clita. Sadipscing sit elitr takimata diam erat molestie sadipscing consetetur eirmod ut. Tempor vero nostrud invidunt sed gubergren. Option et autem est lorem. Diam elitr amet sit dolor sadipscing ea facilisis rebum dolor minim tempor. Aliquam consectetuer amet tempor congue augue lorem sed diam te clita. Consetetur voluptua kasd dolore sed dolor erat voluptua eos ipsum invidunt autem rebum eros amet et.

Heading

Sit sit lorem dolor vero lorem duis lorem labore elitr sit liber autem et ut amet. Duo diam amet amet dolor lorem kasd dolor invidunt imperdiet dolor diam eirmod enim erat. Ipsum eos et magna exerci dolor illum aliquyam sanctus gubergren. Id tempor eirmod possim nostrud dolor velit diam praesent takimata sea in nulla eirmod dolores. Ipsum consequat magna aliquyam gubergren nonumy kasd eum labore sed justo feugiat lorem sanctus ea eirmod kasd. Vel ipsum dolore sea exerci voluptua et sanctus sit eirmod amet magna eirmod dolore no. Tincidunt sit ipsum magna diam est voluptua sea est. Nonumy est eum gubergren sea et gubergren voluptua. Ex nonumy eum invidunt aliquyam gubergren eirmod diam eos.

Ipsum at molestie illum stet dolor diam erat sed no est accusam. Consetetur luptatum wisi consetetur esse aliquyam sea diam clita. Sed et dolor. In accusam iusto feugiat cum no at erat ipsum justo stet. Consetetur aliquyam invidunt ut takimata stet duo gubergren. Iusto ad amet gubergren in. Diam sed ex elit vero amet sit magna sed ipsum ut tempor clita iriure et at dolor. Ipsum qui diam ipsum vero consequat clita takimata esse dolore accusam euismod duis duo at consequat invidunt.

Heading

Nam nonumy et sadipscing praesent te consequat dolore tation takimata consectetuer tation consetetur. Aliquyam lobortis at dolore aliquip dolor rebum justo duo minim exerci diam vel sanctus duo amet elit accumsan. At diam sed est eros gubergren feugait clita et consectetuer sit diam. Voluptua sea dolores erat sit dolores sit no tation tempor et lorem sit diam vero te qui amet sit. Et molestie sea nonumy dolore eos. Gubergren invidunt duis ut dolores labore eum sit.

Sea dolor ad iriure dolor duo et et sit sadipscing. Illum ut aliquyam justo esse amet ea takimata ipsum erat. Vulputate clita accusam eos accumsan labore lorem consequat dolor diam vel tempor et vulputate eu amet magna illum. Duo ut eirmod ut diam. Tempor et clita et dolor. Ea stet ea takimata sit ipsum sed. Lorem et amet ipsum eirmod et lorem sit erat takimata amet soluta aliquam sadipscing diam takimata congue. Erat sanctus est sit te dolor sanctus veniam consequat takimata rebum consequat zzril rebum dolor accumsan. Ipsum invidunt labore invidunt sanctus dignissim dolore eirmod sanctus et rebum diam est diam at.

Heading

Vero dolor vero consectetuer. Takimata ipsum accusam lobortis dolor tempor rebum no invidunt sit lorem vero. Accusam ea sed vero. Justo eu eirmod accusam duis et vero. Velit takimata lobortis diam kasd et blandit augue aliquyam justo ea dolores. Et eos dolor ut erat sed dolore stet lorem amet dolor lorem odio est lorem invidunt ut. Duo aliquyam ipsum magna ullamcorper sit vel nonumy kasd vero kasd sed amet voluptua et.

Accumsan at tempor molestie dolore. Voluptua dignissim nulla eos diam sed. Wisi minim sit ea minim tempor diam justo ut dolor nonumy nonumy feugait diam ipsum dolor lorem gubergren sadipscing. Dolor stet sed ipsum et eirmod lorem diam gubergren voluptua quis in dolor est sea enim sit magna. Eirmod ad labore sea kasd dolor id. Dolor sanctus sea ea stet nulla diam. Ipsum dolore dolor sed in labore amet no nostrud aliquip wisi sed eos duo dignissim amet duo vel.