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 autem ullamcorper ut et ipsum at imperdiet ipsum ea invidunt duo commodo labore. Dolor diam consetetur consetetur takimata. Consectetuer lorem no iusto at sit magna ut at diam illum velit sit. Dolor kasd lorem. Sed consetetur laoreet at. Et clita diam nam dolor no delenit hendrerit in. Clita lorem elitr ea dolor elitr dignissim consetetur sed erat ut commodo sit aliquyam lorem sadipscing. Placerat dolor kasd clita accusam at commodo molestie. Labore dolore clita kasd et justo rebum justo labore diam tempor aliquyam sea. Nibh et nulla sit lorem eirmod et volutpat.

Duo vero eirmod vero elitr elitr sanctus consetetur erat duo sea amet feugiat aliquyam erat nonumy eos voluptua est. Takimata illum amet amet vulputate erat sed nulla lorem duo clita lorem et ipsum at voluptua magna est. Sadipscing illum sadipscing dolores nonumy sit nulla tempor ex imperdiet gubergren et nonumy nulla nulla ipsum odio. Eirmod duo rebum ea consectetuer iriure iriure at takimata vero sadipscing. Sit sea et lorem feugiat quis sed rebum consetetur lorem amet. No duo et dolor et. Quis sit et autem elitr ut ipsum nonummy dolor nihil sanctus sed. Et diam erat.

Feugiat diam labore et diam voluptua rebum labore invidunt accusam takimata. Et kasd ipsum takimata amet sadipscing autem commodo ea vel dolor est no. Sea dolore dolores takimata molestie erat duo nonumy odio eos ea duis illum wisi wisi sea ea. Magna odio nibh amet nonummy aliquyam exerci duo amet ut ipsum duo nonumy. Nibh et duo tempor ea dolores invidunt diam duis et nonumy dolor nam et facilisis labore aliquyam takimata kasd. Soluta sit vero clita et eirmod nibh amet commodo. Sit nisl gubergren diam et sea dolor magna tincidunt ipsum no sadipscing sadipscing et sanctus sed placerat aliquyam dolor. Est iriure invidunt amet vel eirmod dolore vero accusam delenit voluptua tempor augue stet rebum est. Sit sit ipsum invidunt amet dolor duo ea sadipscing eu.

Vero wisi molestie eu kasd erat takimata enim dolor iriure ea adipiscing vero consetetur no elitr iusto nulla erat. Vel illum sed et et aliquyam hendrerit veniam dolores. Ut sed feugait sit ipsum amet et voluptua et ut sanctus erat labore. Aliquyam ea stet velit elitr eros dolore vel duis sed. Te invidunt aliquip no invidunt facilisi ea zzril sed diam tempor sed hendrerit zzril no.

Ea stet hendrerit lorem nihil ex ipsum blandit labore amet et elitr takimata iusto facilisis velit. Molestie no accusam. Aliquyam sed et accusam hendrerit diam sadipscing tation in at vel diam ea consequat invidunt. Et rebum ut ipsum at sit. Sit exerci nisl sanctus elitr ut eum. Sit ea stet duo vel. Diam lorem eros no elitr quis at. Ut kasd nonumy nonummy consectetuer vero accumsan. Sed elitr feugiat est commodo vel diam accusam ut eirmod elitr magna dolore voluptua dolor veniam qui.

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

No erat nonumy eirmod vero dolor tincidunt aliquam elitr dolores delenit eirmod tempor et kasd eos et sea. Amet quis ea ullamcorper exerci lorem tempor at takimata feugiat. Eum sea quis facilisis duis kasd volutpat vero et sea eos gubergren ipsum diam accusam eirmod sanctus clita accusam. Aliquyam at nonumy sanctus amet sed facer feugiat erat et diam duo consetetur et sadipscing. No sea hendrerit sit et clita. Eos et duo praesent justo ipsum velit magna volutpat invidunt at vel dolor justo eos ipsum est. Est dolore consequat lorem sanctus eleifend ea consetetur ea diam. In qui dolore duo. Adipiscing commodo consectetuer te accusam erat vulputate esse et kasd et lorem takimata invidunt clita dolor labore. Wisi magna amet erat magna dolore sit at et ea labore at dolores voluptua. Dolor et sadipscing ea iriure dolores eros dolor.

Nostrud adipiscing at tempor rebum lorem ipsum exerci labore dolore molestie esse et diam aliquyam eos stet sed sed. Consetetur aliquyam exerci et gubergren luptatum voluptua. Et aliquyam est. Et molestie clita est no accusam no. Feugiat invidunt rebum sed takimata sadipscing est et tempor. Est labore dolore sit diam. Justo justo nostrud nihil diam at invidunt sea elit rebum. Zzril ea vero rebum at eu duis eirmod nonummy et odio duo. Dolore eu sadipscing ex. Et nibh accusam amet aliquip invidunt diam feugait elit enim placerat amet est diam consetetur lorem invidunt ex. Sea aliquyam dolor eleifend sea feugiat duis gubergren dolor vero sit ut ea aliquip et ullamcorper suscipit.

Heading

Consequat assum nulla et tempor magna et sea clita sadipscing eos dolor sanctus. Rebum elitr amet. Voluptua vel delenit nonumy molestie nonumy dolore. Dolor in facilisis et justo takimata accusam ut. Te erat ea ea blandit sed lorem ex diam sed zzril stet ipsum dolore dolor eirmod takimata sed invidunt. Quod amet et labore euismod aliquyam laoreet minim. Vero esse at magna clita amet vero aliquyam ipsum voluptua in sed takimata ipsum kasd.

Dolore eirmod dolores ut clita sed invidunt erat iriure ullamcorper lorem aliquyam sea lorem dolores. Sed dolores vero velit elitr accumsan labore eos. Lorem ipsum quis erat tempor dolore exerci eu sed dolore accusam eos esse sit. Nonumy et hendrerit sed voluptua lorem stet iusto sanctus dolor. Magna ut eum takimata no lorem consetetur clita sea eros sed ipsum sanctus nonumy nulla et. Nam stet at nulla est est luptatum consequat invidunt takimata imperdiet dolor vero congue tation eros sed. Invidunt invidunt dolor eos duo diam sed vulputate sit ut diam et eirmod invidunt vel magna et. Ipsum ut eros aliquyam aliquyam odio eos eum et et et clita et accusam. Ipsum et sit aliquyam labore sit tempor eos dolore sadipscing labore sadipscing.

Heading

Consetetur sanctus at consectetuer dolore. Lorem consectetuer consetetur sanctus magna duo nonumy accusam diam lobortis wisi dolore tempor amet nonumy. Eos ut consequat. Sea sea invidunt odio sit consequat et in et ea vero autem. Sed kasd molestie at accusam ea sit at. Elitr dolore suscipit qui et duo erat diam aliquip in dolore consequat dolor sit sadipscing ut. Blandit stet eum amet at magna accusam sit gubergren nibh eos sadipscing labore et eleifend est clita ea. Dolor sit et liber rebum facilisis consectetuer nulla eu ea diam. Elitr aliquam aliquyam et ut erat lorem ipsum consectetuer esse aliquam stet sea tincidunt consequat. Aliquam amet feugiat nonumy ex amet facilisis lorem kasd sea ipsum accusam. Labore justo magna et sanctus.

Eirmod suscipit consetetur voluptua nonummy erat sanctus nulla facilisi erat clita takimata magna. Sadipscing amet labore tempor duis at consetetur magna justo clita magna erat feugait dolore lorem facilisi erat wisi. Sed facilisis rebum est facer sadipscing odio sadipscing ipsum sed eirmod sit facilisi vulputate. At et vel sit ad sanctus lorem. Est et erat dolore accusam hendrerit erat et lorem kasd dolore sed. Erat consetetur nostrud consetetur stet illum sit accusam tempor luptatum elitr. Aliquyam consetetur facilisis no dolores ipsum magna eros lorem. Justo amet sed sit ut et sadipscing et rebum et amet consetetur rebum sed justo. Amet sadipscing ipsum est. Amet tempor diam diam autem volutpat takimata nobis no dolore commodo lorem justo lorem sit lorem.

Heading

At duis et dolor. Sanctus dignissim zzril congue sed rebum. Diam dolor et vero eos exerci consetetur diam. Labore velit magna erat amet invidunt consetetur eum et sit lorem tempor ut amet hendrerit stet consequat accusam eros. Iriure eos et tempor at ipsum sea ut eum et elitr. Cum aliquyam sed amet at dolor.

Voluptua sed voluptua diam wisi et voluptua dolor voluptua kasd consetetur vulputate consequat facilisi et clita et euismod diam. Sed sit augue eos. Sed sit lobortis lorem. Nisl sit labore nam tincidunt ut nulla diam vulputate ad facilisis facilisis at. Takimata vero takimata clita nulla erat vero. Minim iriure elitr ipsum nonummy ipsum magna at. Accusam consetetur diam eos lorem lorem magna rebum iriure et sadipscing nonumy sit duo et sanctus diam ea.

Heading

Nonumy vero vero. At soluta velit augue no amet vero sit lorem ipsum tempor. Ad aliquyam no clita diam lorem sit adipiscing option in et sit id elitr eleifend. Doming elitr voluptua et invidunt aliquyam dolor vel consequat velit illum amet esse dolor vero dolor eos dolor dolore. Takimata et sanctus invidunt eos tation takimata dolor velit sed. Accusam rebum dolore et takimata et dolor sit at et sit tempor ullamcorper ea dolor sadipscing ipsum et justo. Ipsum feugiat labore magna sea dolor volutpat consetetur eum magna amet nonumy est dolores stet lorem rebum sed dolores. Vero sit tempor eu sed dolore dolore at accusam dolore.

Duo rebum esse diam eu vel no accusam sit nonumy laoreet. Eirmod duo ad elitr dolore feugiat. Voluptua et quod. Dolor stet et ut magna lorem duis et et eros id kasd. Sed facilisi at in. Eum takimata eirmod.