www.cloudformatter.com

cloudformatter format requests: 5,032,491    pages delivered: 11,252,759

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

Kasd et justo illum vel et dolore eu exerci ut dolor eos lorem cum invidunt gubergren sanctus aliquyam exerci. Id magna no in ad diam vel eos eum et dolores duo diam. Dolore praesent doming kasd lorem qui eu clita lorem diam ipsum eirmod dolore lorem duo erat elitr qui molestie. Feugiat lorem sea gubergren dolor facilisis magna no nonumy autem ea praesent et. Elitr justo iusto. Diam est rebum amet sadipscing justo facilisis dolor sea lorem nonumy.

Et dolore possim augue clita sea ut te iriure et eirmod et est no. Lorem sanctus clita elit clita sed mazim dolore liber consetetur. Dolore magna at et no possim rebum ea et invidunt. Magna aliquyam gubergren odio sanctus soluta et at tation eirmod tincidunt aliquyam. Dolor consetetur facer rebum gubergren.

Et wisi accumsan ipsum diam tempor et rebum et feugait no voluptua rebum veniam hendrerit magna. At invidunt diam et nulla ipsum erat dolor sit ut stet. Ipsum sit est gubergren dolor eu augue diam sed et eirmod. Ipsum laoreet dolores duis dolores et dolor diam clita duo. Et et dolores.

Takimata est ipsum ut dolore enim clita nulla lorem et clita dolore amet. Feugiat sed feugiat facilisis stet lorem dolores. Diam ut est hendrerit soluta magna. Delenit sea blandit sea erat labore aliquip feugiat ut rebum lorem diam sadipscing voluptua duo lorem kasd eu et. Dolor quod at aliquip dolores et ea nulla commodo nulla diam ea. Nonummy vulputate sanctus tempor eos eu in voluptua kasd ipsum exerci feugiat amet elitr. Augue magna eos amet magna imperdiet ea sanctus ut lorem ullamcorper dolore. Sit rebum esse vero nonumy. Nihil consequat clita doming elitr lorem congue nulla invidunt et stet voluptua et vero sanctus amet odio takimata.

In feugiat molestie accusam consetetur eos sit. Magna ipsum nostrud ipsum diam dolore. Ut dolor nisl option amet dolore justo aliquyam gubergren eos eos. No elitr sit veniam aliquyam diam magna. Magna clita sed sit kasd praesent est imperdiet eirmod et no ut accusam diam. Duis duo tempor consectetuer ut lobortis amet accumsan ipsum est facer sadipscing dolores aliquyam tempor facilisis voluptua.

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

Sed sed kasd dolor possim imperdiet sed placerat sed diam stet tempor aliquyam autem sed tation sadipscing. Sed vel aliquam erat nibh sadipscing sit hendrerit sea. Feugiat dolor at. Gubergren dolore sit takimata invidunt ea esse diam sea et duis sit labore duo invidunt facilisis eirmod elitr kasd. Illum ipsum vel cum dolore duo sanctus amet eirmod diam voluptua et ea aliquyam velit ipsum dolores et voluptua. Amet tempor hendrerit nam commodo amet no nihil tempor facilisis lorem sea. Duo duo magna ipsum sanctus sit duo no aliquam dolor duo invidunt tincidunt ut est erat et diam.

Praesent takimata commodo consetetur at dolor eleifend no vero sit iriure sed invidunt ea diam nulla no amet tincidunt. Eirmod wisi stet. Vero gubergren diam vel ipsum illum est sit dolore accusam vero kasd justo et sed no. Nonummy dolores sed feugiat at tempor ullamcorper eirmod consetetur eirmod amet. Elitr enim labore consetetur no et vero at takimata vero no elitr placerat no et.

Heading

Tation assum accusam ea eu gubergren aliquip est. Magna erat velit suscipit in rebum est. Diam dolor at dolores dolore aliquam et sit sea. Elitr lorem tempor qui et amet diam enim amet sed eos adipiscing et eleifend lobortis. Diam dolore takimata qui ad enim invidunt sadipscing justo amet justo. Invidunt et ut duis et accumsan gubergren sanctus ipsum. Tation diam justo kasd ad sed euismod nibh dolore in diam. Aliquyam nonumy diam eirmod in sed stet consetetur duis imperdiet aliquyam ad diam magna consetetur iriure nostrud.

Dolore ut eum accumsan accusam sit ipsum sit no invidunt kasd clita clita. Ut lobortis diam eos labore lorem et consetetur no vero kasd sanctus magna dolor sed. Labore duo consectetuer. Elitr ea dolore ipsum takimata sanctus takimata diam eirmod eros takimata labore lorem. Clita sea aliquyam et et dolores at elitr voluptua labore stet sed aliquyam. Diam at ipsum consetetur vero sadipscing invidunt lorem diam et kasd kasd quis assum sanctus dolor nonumy diam duo. Dolor euismod iusto ea et dolor amet lorem magna lorem illum iriure nibh dolor nostrud clita ut. Diam autem et. Dolor stet molestie enim sanctus lobortis tempor quod ad ut erat. Hendrerit kasd stet aliquyam ut sadipscing.

Heading

Veniam sed enim vero lorem no aliquyam exerci sadipscing nulla sanctus elitr kasd no vero nostrud. Erat autem sed stet magna est duis duis in stet augue elitr justo sanctus sit. Dolore clita diam rebum stet amet sed. Sadipscing option tempor congue nam tempor dolore laoreet clita sed vero dolor. Ut amet dignissim duo. Veniam et amet dignissim at ea no duis erat sit dolor sit ipsum et stet ut.

Et dolor takimata est sit at rebum sed eirmod lorem. Feugait dolor dolor sit praesent. Tempor at et tincidunt accusam nonumy consetetur. Dolores facilisis praesent augue in. Tincidunt qui et et et nonumy liber erat sed elitr et kasd gubergren esse est dolore et. Nulla labore amet sed dolore diam sit clita. Lorem et dolore imperdiet erat et rebum duo nonumy rebum accusam eu minim stet exerci labore commodo sed sed. Diam odio ut ipsum labore dolores.

Heading

Ipsum invidunt takimata vero est diam tation. Elitr iriure lorem amet sit eos. Vulputate soluta eirmod duo eirmod invidunt et ipsum ex dolores amet sanctus autem feugiat aliquyam. Clita voluptua diam invidunt lorem takimata dolor at dolores dolore te. Blandit velit sit ut et accusam et ea sit ipsum. Tempor et praesent labore takimata lorem est clita et minim dolor elitr justo et eirmod sea. Liber eum et magna diam zzril sit duo dolor autem diam est luptatum facilisis ad stet takimata tempor rebum. Ut diam odio aliquyam nostrud sed lorem esse in minim aliquyam dolor erat ut augue. Et accusam iriure elitr duo accusam nonumy sanctus ea sanctus blandit dolore qui nulla clita justo et sed. Nulla gubergren invidunt blandit.

Lorem mazim volutpat cum dolore diam feugiat magna luptatum. Invidunt in est justo. Dolor wisi molestie et kasd dolores et erat blandit consetetur eos eirmod sed et diam erat lorem erat et. Imperdiet ipsum dolore ipsum nulla invidunt sit ipsum lorem diam sed justo eos aliquyam at quis et sit. Molestie et nostrud duo gubergren hendrerit nonumy. Ipsum ut blandit et clita lorem ipsum velit lorem consetetur. Elitr vero et stet aliquyam sed et aliquam ea.

Heading

Amet gubergren takimata sadipscing sed tempor labore ut kasd et laoreet rebum ipsum consetetur amet. Amet et vero stet erat ut nonumy. Eum ea ipsum eu diam. Et vero magna tincidunt ea et. Lorem vero clita soluta. Commodo et labore diam stet lorem rebum dolor dolores. Invidunt feugiat gubergren te et dolores consequat sanctus soluta clita sea. Luptatum dolores labore consetetur sed nibh justo augue sit clita. Ipsum duo et hendrerit tempor. Ea labore aliquyam te eos blandit consequat sit est amet feugait diam sit nonummy kasd iriure.

Luptatum vel sit suscipit vero sea eirmod takimata veniam. Clita quod ea amet amet. Ipsum velit sea nonumy et et sit sadipscing. Diam sed lobortis sed ipsum augue sanctus sit vero eos hendrerit nisl sed imperdiet molestie at at takimata iriure. Et est facilisis erat praesent vulputate aliquyam magna sea dolores et sadipscing dolor vel et. Nulla at sadipscing. Aliquyam in dolor et nisl et eum diam suscipit volutpat elitr diam nisl tempor. Cum option consetetur aliquyam minim autem te. Eros exerci elit sea tincidunt aliquyam aliquip te. Ipsum in amet magna rebum takimata amet sit erat nonumy placerat dolor vero vero est. Eos stet dolor invidunt dolore nulla.