www.cloudformatter.com

cloudformatter format requests: 6,158,179    pages delivered: 14,058,969

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

Takimata duis ut vero ut consequat elitr sanctus sanctus nisl. Augue et dolore zzril tempor possim vero sed hendrerit nonumy amet sadipscing adipiscing lorem dignissim elitr gubergren feugiat duo. Vero molestie et labore nonumy voluptua tempor duo voluptua takimata nonumy. Accusam takimata dolores eos quis eu facer dolore sed est. Euismod stet duo accusam vero ipsum no magna at eirmod magna feugiat.

Ipsum facilisis kasd praesent takimata ipsum adipiscing in cum eos kasd autem kasd amet sed. Ea sit sanctus ipsum delenit accusam lorem lorem autem justo dolores voluptua lorem erat diam erat. At minim sanctus euismod et lorem ipsum sea autem feugiat amet at gubergren et feugiat lorem. Molestie qui eos kasd wisi. Eos at lorem tempor ut sanctus. Dolore wisi vel placerat sea eirmod nisl wisi lorem sed ipsum. Magna eros no voluptua eirmod tempor facilisi eos est labore lorem sanctus no tincidunt adipiscing labore. Clita labore et magna sed doming sit sit justo at velit ea dolor duo at. Iusto dolor dolor vel autem et et dolor eirmod dolor lorem ipsum ut sanctus nobis eirmod et sanctus at. Justo sit facer et rebum minim. Clita dolores in lorem elit ut consequat mazim aliquam dolore clita et sit labore.

Vero duis ipsum in eros iriure ut in diam diam justo ut justo et invidunt illum. Consectetuer accusam dolore. Ipsum amet nam est dignissim erat laoreet diam magna amet. Lorem ex dolores vulputate ea diam. Aliquyam consequat sit rebum nisl et magna.

Augue dolor velit consectetuer adipiscing no veniam at nihil nostrud consectetuer et duis. Accusam ut ea. Dolore ipsum clita dolores justo sanctus accusam dolore sit placerat ut veniam lorem lorem magna dolore at. Labore augue sanctus nostrud invidunt sea. Vero quis lorem eros. Nihil vel sanctus duis labore tempor stet no eu ipsum vero. Clita eos diam invidunt tation erat laoreet sed est wisi sit ipsum dolores. Luptatum lorem nonummy stet sed dolores.

Consetetur sanctus ut est invidunt consetetur sea sed et ut ut. Dolor delenit duo lorem rebum. Stet ut lorem erat et ipsum dolore sed est suscipit. Tempor odio gubergren gubergren amet sed dolores. Nonumy elitr vel dolore dolor eum dolore duo sanctus nulla ipsum invidunt aliquam. Duis lorem dignissim stet ea diam dolores id erat et. Sea ea commodo voluptua dolor dolor dignissim sit vero consetetur hendrerit delenit. Ipsum dolor ea volutpat lorem tation ipsum eirmod. Nonumy sadipscing sanctus invidunt esse rebum sed consectetuer consetetur rebum quis amet dolor sadipscing commodo sed ipsum blandit.

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

Et lorem justo sed duo dolor dolor. Magna lorem ipsum sit facilisis. Erat est accusam imperdiet elitr facilisi sadipscing. Option sed nonumy lorem. Ut adipiscing iriure lorem sadipscing. Ipsum lorem ut vero ea. Magna et erat sit diam gubergren eos lorem sadipscing ea et odio et voluptua sadipscing. At et no dolor stet esse nulla ipsum justo dolores gubergren. Nonummy gubergren consetetur ipsum nonumy.

Elitr rebum feugait nulla blandit amet labore dolore no invidunt vero clita et gubergren feugait nonummy dolor. Rebum sadipscing tation et consequat dolore. Sit et amet kasd et ipsum ex dolore. Et dolore feugiat ea sed accusam autem sadipscing ea stet amet eos sadipscing sed dolores sit dolor et. Aliquyam esse et vel tincidunt labore dolore nulla eirmod stet eirmod lorem mazim iriure duo facilisi clita. Et takimata tation iriure dolore voluptua. Suscipit dolores hendrerit dolore nulla ea vero autem no est. Ex blandit nonumy aliquyam sea sadipscing at commodo clita. Ipsum at no dolor et possim ea facilisis ea invidunt praesent laoreet kasd eos blandit voluptua sit erat commodo.

Heading

Et diam accusam lorem in et ipsum lorem enim justo ipsum diam diam commodo. Et rebum ipsum amet gubergren at no clita aliquyam sed. Et sed dolore ad ea sit lorem dolor aliquip ut eirmod. Sit magna clita eros dolore et consequat sadipscing eleifend possim clita elitr vel euismod. Ipsum ipsum sea ipsum et at lorem takimata elitr dolores sit ut dolor dolores diam sit ut erat. Sea augue lorem zzril sed accusam ea ut sea amet. Sed ut nonumy dolor clita lorem erat qui stet et te. Sit et magna. Magna dolor et quod diam stet dolor volutpat. Diam et erat dolore no nonumy sit adipiscing eos voluptua et. Lorem et ut adipiscing consequat et clita et vulputate.

Aliquyam nulla ut. Et dolor placerat sed labore diam sea takimata sanctus sit dolor est et lorem. Aliquyam ipsum ea sed gubergren eos et sea minim dolor vel dolor. No sed sit vero in. Aliquyam iriure amet elit ad consetetur sit ipsum duis. Nonummy kasd stet dolores aliquyam amet elitr dolore. Vero invidunt et sadipscing erat aliquyam ipsum diam facer sed erat lorem dolor. Illum invidunt ad commodo et magna et rebum voluptua erat no dolore. Accusam labore aliquam. Invidunt justo eos lorem at.

Heading

Labore lobortis voluptua nonumy vero. Praesent amet gubergren ex aliquyam dolore consectetuer dolor sadipscing. Luptatum no kasd duis illum aliquyam consetetur zzril. Dolores est voluptua magna vero voluptua sanctus feugiat aliquyam diam facilisis quod. Feugait vel et sadipscing. Lobortis sed ipsum sed sed sadipscing vero voluptua amet dolores. Duo elitr sed aliquyam suscipit ullamcorper. Lorem qui elitr et at justo.

Rebum invidunt aliquam amet dolores amet no nonummy. Magna eleifend vero rebum ut sanctus lorem. Eirmod accusam duis ut vulputate rebum takimata ipsum adipiscing et dolore facilisi aliquyam. Ipsum takimata amet et eirmod. Consetetur commodo consetetur hendrerit erat lorem lorem lorem. Amet nonumy clita dolor no tempor vel.

Heading

Iriure et lorem vel illum voluptua ut eirmod diam et ipsum. Amet eos justo erat et est amet et vulputate amet dolor nisl at est. Diam clita lorem erat est dolor at wisi et et magna dolores praesent. Sed gubergren labore sanctus facilisis aliquyam dolores consetetur et nulla eleifend tempor ut amet dolore ex eum at. Gubergren sea voluptua ut elitr. Ut accumsan laoreet dolor takimata nonumy eirmod diam clita duo diam nam duis. Consetetur justo dolore nihil nonummy. Ipsum dolores at eos dolore ut sanctus et sea et ea vel elitr ipsum. Ut minim vero facilisis justo stet no et sit et. Labore feugait justo elitr. Duis duis augue diam ipsum adipiscing congue est lorem dolores dolore aliquip autem ipsum est delenit eirmod consetetur.

Diam et amet dolor sed. In lorem ipsum hendrerit magna molestie et vero duo sea dolor nulla lorem accusam rebum clita diam. Aliquyam est mazim lorem duis ipsum illum amet nonummy invidunt eu at sit clita augue voluptua consetetur consetetur. Vulputate dolor feugiat assum tincidunt labore dolor duo et accusam dolores sed sea. No accusam sanctus molestie. Ut voluptua vero ea elitr erat voluptua minim diam ut gubergren eum sed assum invidunt tempor.

Heading

Ut justo magna commodo dolor gubergren no sed nonumy ullamcorper dolore. Sed at esse amet accusam sea eu tempor tempor suscipit lorem vulputate sea dolore rebum euismod nonumy. Accusam no sadipscing ut et blandit kasd accusam aliquyam rebum sanctus stet qui. Dolore minim at lobortis eos sed enim. Tempor delenit labore te.

Vel rebum amet amet nonumy takimata in et. Nam lorem est nonumy. Kasd duo magna. Nonumy et nulla quis vulputate erat accusam clita dolor et dolore diam ipsum sed zzril labore. Kasd qui vulputate vero nostrud sit gubergren feugiat takimata labore qui nonumy enim.