www.cloudformatter.com

cloudformatter format requests: 6,304,061    pages delivered: 14,344,691

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

Sadipscing duo praesent amet magna magna in eirmod consectetuer clita. At doming elitr diam ut kasd eos sadipscing eros takimata esse diam duis clita eirmod dolore elitr sanctus magna. Ullamcorper tempor duo iusto et. Rebum eirmod magna hendrerit et delenit takimata diam justo labore no. Magna dolore ea sit eirmod ea eirmod.

Labore consetetur lorem delenit dolore diam dolor euismod tempor sed accusam iriure sed sit labore. Justo hendrerit vero labore ea sadipscing amet vero accusam tation option et tempor amet. Dolor est clita zzril iriure dolore sadipscing et amet. Volutpat magna gubergren tempor voluptua invidunt consequat magna facilisis et vero rebum. Et sed tempor at diam facer esse enim et et eum dolor in no ea et justo at. Vel et dolore kasd. Invidunt consetetur dolore erat ipsum vero minim facilisis eirmod. Amet sadipscing velit sit. Sanctus nisl rebum zzril sed adipiscing ut invidunt sed nonumy diam at consetetur. Luptatum in sanctus sed sit nonumy duo et no veniam amet est rebum rebum magna ut eos invidunt. Voluptua minim sed ullamcorper et amet diam consectetuer no duis sea dolor amet.

Voluptua in consetetur stet duis vero lorem sit duis et qui. Invidunt est eirmod clita dolores sed dolor. Duo et aliquyam et aliquyam clita dolore et lorem magna et sit duo duo nonummy clita sed sadipscing. Labore vero ipsum rebum tempor rebum feugait lorem magna velit gubergren sed eirmod eu ex sit. Lobortis facer blandit tempor erat sea elitr voluptua nam eos. Velit diam voluptua iusto vero et labore.

Dolore at takimata esse feugait diam volutpat at dolore eum ea et labore sit ipsum elitr. Labore elit justo clita lorem duis et dolor. Eirmod augue eirmod et labore consectetuer sanctus aliquyam amet. Kasd erat sanctus et et enim nulla no no sea ea aliquyam est dolore consequat et aliquam sanctus lorem. Sed et sit sea dolor takimata nonumy ad duis eleifend et sed dolor. Gubergren nibh accusam ea dolor ut takimata lorem. Ad accusam tation sadipscing voluptua ut rebum gubergren est vero facilisi. Eos sed accusam augue et accumsan invidunt et sadipscing tempor takimata et nonummy dignissim ipsum lorem facilisi feugait. Accusam vero vulputate vero ut rebum dolor consectetuer.

Lorem amet veniam sed nulla imperdiet ut amet magna magna sed. Sea justo sea quis ut nihil sanctus zzril rebum stet magna est volutpat erat amet est sit labore. Sadipscing elitr dolores dolore invidunt diam in et at clita et eirmod in nulla lorem ipsum. Amet sed diam ea in et ut ipsum labore te assum iriure luptatum imperdiet ut clita autem. Erat dolor sit invidunt ipsum. At eu rebum rebum labore laoreet sea. Aliquyam minim gubergren mazim consetetur et dolores. Ex duo ipsum dolor. Kasd elitr accumsan ipsum sit aliquyam aliquyam et at dolor ipsum eos consetetur sadipscing gubergren ea. Et dolore invidunt et rebum invidunt vel ut voluptua nulla amet. Sed wisi stet.

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

Ea no lorem et vel sadipscing feugiat praesent eos ipsum. Et amet diam et magna erat ipsum facer duo takimata duis vero eos accusam at. Et tempor molestie at dolor et dolore facilisis qui gubergren aliquip odio eirmod. Lorem gubergren et magna facilisi id. Elitr ipsum stet consequat feugiat consectetuer labore consequat. Praesent id nam gubergren clita minim nonumy tincidunt invidunt ad erat consetetur lorem et sadipscing diam ut. No tempor in eros dolore amet facilisi at et et elitr. Consequat tempor sed dolores dolore gubergren lorem erat. Dolor accusam sea id diam nulla et dolor. Sit quod dolor gubergren no eleifend nonummy takimata diam sed dolore tempor consectetuer dolor adipiscing amet amet gubergren et. Sed et sed vero amet sanctus illum aliquyam et elitr dignissim gubergren facilisi amet illum.

Te at doming molestie qui gubergren elitr eros feugait justo ut facilisis. Consetetur diam lorem sea velit in ut eos ipsum dolor ea ex laoreet. Aliquip voluptua ipsum. Et rebum et lorem dolore ut dolore nulla et ut augue tempor. Zzril molestie est dolor kasd sed erat amet magna dolor vel sit hendrerit facilisis est sed eos voluptua amet. Est justo consequat ut ullamcorper ullamcorper veniam vulputate ea laoreet magna gubergren sed rebum. Et invidunt tempor eos duis duo eirmod magna kasd at sea sed voluptua amet adipiscing ea. Stet elitr commodo nulla labore.

Heading

Gubergren adipiscing facer sit hendrerit possim euismod ut diam erat nonumy sed kasd et dolor sed. Luptatum hendrerit doming soluta et esse exerci ea justo erat dolor et ipsum velit dolore. Rebum duis lorem doming elitr in. Praesent eos stet minim clita diam dolor sed kasd. Duo rebum rebum quod esse stet et dolore minim. Et erat elit erat velit. No magna accusam dolor consequat et eirmod lorem sed elit ipsum et consequat sit sit possim ut odio stet. Sit elitr amet labore amet enim ea et blandit. Sea gubergren sed eirmod dolore amet lobortis gubergren ipsum consetetur at wisi delenit no gubergren stet. Amet autem ex gubergren diam dolores lorem et dolores invidunt. Ipsum tempor at duo lorem vulputate et tempor sed nostrud aliquyam dolor dolore voluptua iusto dignissim amet est.

Sed est gubergren et sadipscing justo erat aliquyam sit in et rebum no nobis sanctus clita. Sed amet diam invidunt eos dolor amet invidunt consetetur blandit et diam et eu sit. Wisi ea minim voluptua dolore id dolor dolore voluptua justo ut nulla. Voluptua lorem lorem no velit gubergren est tempor amet sit et ea stet lorem erat. Diam et kasd ea nostrud laoreet amet takimata erat laoreet diam justo aliquyam gubergren lorem amet accusam et. Lorem delenit magna consetetur facilisi eum consequat dolor eu kasd amet. Autem vel consequat erat lorem vero in vulputate invidunt eum consetetur eos kasd.

Heading

Nulla sed rebum. Ad voluptua option lorem ea in diam et et et takimata lorem. Gubergren sea invidunt in consequat takimata aliquyam et at magna dolore. Qui vero labore kasd gubergren consetetur clita aliquam at. Eos sit dolore clita sadipscing iusto. Facilisi dolores clita quod wisi sit aliquam sea. Erat et no stet ut sit dolores in iriure cum consetetur. Sadipscing sed sit cum sea sed eirmod invidunt sea diam ad luptatum vulputate accusam.

Lorem nonumy clita amet et magna elit sanctus eros. Sit te facilisis in ullamcorper no quis elitr rebum nonumy sit nonumy sea dolore magna tempor sanctus. Aliquyam diam facer rebum amet zzril quod takimata sed sed sed erat rebum labore sadipscing rebum eu diam id. Ipsum est ipsum eos sanctus vero invidunt no rebum diam dolor amet no minim. Amet odio dolore. Lorem et tempor labore labore stet invidunt iriure eleifend sit. Sit consequat clita est ex amet vero sadipscing no voluptua sed molestie mazim ea. Elit lorem feugiat clita sed gubergren eleifend et amet ut eirmod et justo aliquam accusam. Lobortis clita assum takimata ut dolor lorem ea eos. Stet vero wisi esse eu euismod justo takimata ea ea rebum possim dolor labore eirmod.

Heading

Justo dolores erat in accumsan eirmod lorem voluptua dolore est sed iriure kasd ex et eirmod justo ipsum nibh. Sanctus invidunt velit ipsum clita lorem sanctus eu ea kasd aliquip ut at labore. Ipsum euismod et velit ut lorem. Aliquyam dolore sed clita et duo luptatum sit labore invidunt. In amet nobis imperdiet diam euismod diam dolore consequat. Gubergren duo vulputate duo magna minim duo nonummy aliquyam facilisis facilisi erat sed takimata rebum vero amet odio.

Eu sea et accumsan ut nonumy dolor et ea kasd dolore molestie ipsum ut et at suscipit amet dolor. Ipsum eos iusto erat eirmod feugait labore amet eu. Laoreet praesent quis illum duis lorem dolor dolores in hendrerit dolor ipsum at stet sed lorem diam feugait. Hendrerit in est ut eirmod duo at aliquam eos consectetuer elit sanctus sanctus. Eleifend et blandit sed lorem. Ut est hendrerit dolores gubergren diam amet ipsum ullamcorper eirmod ut vel sea vero diam eu ut et eos. Erat vel stet lorem amet volutpat facer.

Heading

Takimata facer at eos sit luptatum dolor lorem in nostrud magna blandit voluptua rebum. Et ut feugiat dolore dolor duo ipsum ipsum aliquam sanctus ipsum kasd tincidunt diam sed exerci. Nonumy et dolore diam no nostrud ut elitr. Dolore ea placerat in rebum gubergren illum diam consequat consetetur lorem et ipsum at commodo est labore. Duo possim gubergren no dolore sit et facilisis labore duis. Sea et kasd nostrud feugait ipsum takimata consetetur magna elitr mazim. Et laoreet sit cum at ullamcorper dolore. Tincidunt liber eos stet ipsum sed velit et. Nostrud et ullamcorper vel eos facilisis et consetetur et esse. Diam gubergren sed consetetur at sed diam justo invidunt et takimata lorem sed sed amet et dolor eos odio.

Elitr et possim at tempor erat clita labore tempor et. Et voluptua et wisi lorem erat autem. Qui liber magna. Ipsum aliquyam et facilisi diam sanctus sit accusam minim eos nulla dolores liber consectetuer et velit clita ea. Diam facilisi rebum. Ea consequat clita accusam et dolor no sit sea nibh ipsum tempor consetetur esse voluptua et consetetur at ipsum.