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 ...
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 pagekeep-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 pagekeep-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 pagekeep-together.within-line: set to "always" and used to keep a span
of content glued always together in a single lineThe following shows some demonstrations of these capabilities.
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>...Sanctus est labore eos vero ea dolor ea diam aliquyam et kasd kasd. Consetetur kasd mazim vel qui est et sadipscing. Justo clita in. Consetetur dolor esse sit lorem ut sea est sea aliquyam nonummy. Gubergren elitr ut ullamcorper sit erat at no lorem dolor clita. Mazim ea et id clita diam ea amet nobis te ipsum. Est erat nonumy vero ex. Ea feugiat clita sit diam rebum sanctus dolor sit. Eirmod magna labore dolore diam sed vero diam ipsum et elitr qui ea et sit lorem.
Justo ullamcorper ut ipsum lorem duo et option ex et nihil. Eirmod dolor diam ullamcorper vero accusam eros quis et consectetuer et nonumy accusam lorem. Eleifend minim kasd lorem nulla vero et consequat odio. Qui sea dolores diam gubergren iusto dolores veniam erat kasd. Sed invidunt dolor ea ea lorem duis est diam rebum et stet gubergren aliquip et elitr. Dolores amet nonumy.
Accusam laoreet stet feugait magna illum gubergren ut at et sadipscing sed suscipit voluptua ea amet. Sea dolor sed dolore voluptua ipsum eirmod dolore sed nibh magna. Id quis est ipsum consectetuer justo vero vulputate ut dolores duo amet est consectetuer. Diam magna elitr nibh sed diam et et tempor duo elitr amet justo vero ut lorem est. Gubergren justo eum vulputate at eos eos et dolore elitr. Amet luptatum sed sea stet kasd nulla ut sit ipsum dolore. Et duo vel no vero eos duis esse stet dolor dolor sed ut ad exerci euismod justo lorem. Facilisis nulla ea tempor velit. Liber takimata delenit diam qui est nonumy nihil amet ut.
Rebum ipsum sit justo et dolor tempor duo. Sed erat volutpat. Amet veniam et nisl veniam facilisi magna gubergren amet consequat et rebum clita te elitr lorem. Accusam nonumy nonumy ut est est ut. Sanctus blandit sit blandit. Veniam nonumy sed gubergren tempor takimata stet amet ipsum adipiscing. Takimata dolor aliquyam vel est gubergren accusam enim amet.
Rebum vel dolores id sadipscing dolore quod feugait lorem magna elit clita. Sea tempor ipsum. Et dolore volutpat vero possim clita sit lorem vero labore est amet ea liber. Rebum voluptua id no tation sadipscing ea sit aliquam nonumy sit et accumsan diam sea. Justo nibh magna illum ullamcorper praesent ea accumsan duis accusam placerat. Aliquyam possim ea tation consetetur ea volutpat vel luptatum placerat hendrerit consequat dolores. Sit ut feugait nihil erat stet dolor in invidunt molestie dolores vero eros nonummy dolor. Dolores ipsum stet luptatum accusam. Sadipscing takimata dolor. Iriure tation hendrerit doming duis soluta ea tempor dolores magna et lorem et diam.
Thus all of this content from the header through this paragraph is together on a single page.
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.
Ex diam eos tempor eirmod tempor lorem erat vulputate tempor diam aliquam. Accusam voluptua accusam amet erat possim at ipsum no ipsum dolore in diam dolor adipiscing accusam duo sanctus. Autem luptatum amet zzril amet voluptua in. Lobortis clita accusam augue at amet dolores dolor est. Duis nonumy nonumy takimata in sed vero vero. Eu feugait in no accusam duis duo consequat et no erat tempor.
Labore invidunt invidunt assum. Voluptua dolor nonumy lorem diam sadipscing justo volutpat ipsum sed consetetur dolores in feugait eu est sit. Lorem lorem lorem takimata no rebum tempor voluptua facilisis at ipsum est lorem est vulputate labore. Elit feugait feugait stet et ipsum dolore veniam amet diam elitr iusto minim elitr ut nonumy ut et. Sadipscing duo eirmod at feugiat amet adipiscing sed erat.
Nonumy sea eos dolor tempor dolor suscipit eirmod eirmod sit et sea rebum tempor id iusto rebum. Rebum lorem nisl eirmod ut hendrerit autem facilisi dolore. Stet amet vel. Magna gubergren eirmod eleifend ea dolores est tempor dolor. Diam eum voluptua sea ullamcorper eirmod tempor dolor consequat feugait tempor duo consequat amet sadipscing magna. Enim dolor nonummy. Nam volutpat ipsum nonumy tempor illum consetetur et dolor augue diam sit gubergren.
Consequat dolor dolore nulla sed dolores ad amet. Adipiscing eos labore sea illum accusam exerci exerci at tempor accusam eos takimata clita voluptua laoreet elitr tincidunt magna. Nonummy laoreet eirmod hendrerit ex lorem ut consequat dolores consequat tempor sadipscing ut et autem sanctus sit. Nonumy voluptua est ipsum et et exerci ipsum no at. Sea lorem te diam aliquip aliquam. Amet et takimata lorem et voluptua facilisi eos diam sed tempor ex ea dolores voluptua suscipit velit consequat voluptua. Amet vel magna. Facer consetetur magna feugait dolor luptatum tempor amet sanctus.
Ad autem blandit consetetur aliquyam. Lorem amet facilisis ea diam. Vero magna stet at kasd facilisis diam at clita sit sed. Accusam accusam dolor lorem sed tation. Te gubergren sanctus diam sanctus dolore ex amet. Aliquip eirmod accusam diam stet ipsum dolor diam sea eros voluptua ut sit amet et exerci lorem.
Tincidunt ipsum ad sit duo nonumy enim est voluptua ut ullamcorper voluptua facilisi. Labore sed elitr ea nulla consequat vero et et. Tempor amet sit. Magna justo et magna sed dolor diam erat tempor tempor dolor tempor. Consetetur at vero sit labore justo eos clita duo ullamcorper clita.
Dolores tempor nostrud ut magna justo nonumy invidunt vero dolore ea invidunt nihil feugiat. Ipsum diam voluptua ipsum sadipscing eos rebum ea dolore sit invidunt zzril diam dignissim. Autem sea clita nostrud erat amet ex in takimata et no sed ea elitr clita rebum erat. Eros gubergren diam eirmod rebum wisi aliquyam. Tempor dolor accusam amet iusto sit dolore gubergren ipsum at. Eirmod congue aliquyam dolores wisi ea ipsum ut erat ad lobortis lorem magna duo est ut.
Amet dolor magna nonumy amet rebum soluta et stet iriure hendrerit euismod exerci tation accusam. Dolore kasd ea kasd consetetur nonumy lorem. Ut sed ipsum dolor accusam iriure eu et eos nostrud no nihil sadipscing. Eirmod et ea duis ipsum eirmod diam. Est amet erat vero adipiscing euismod et consequat elitr et ad labore consetetur lorem duis duis augue. Erat tation accusam lorem lorem placerat dolor sanctus takimata ipsum autem augue invidunt sed lorem.
Rebum eos ea amet eirmod aliquyam sea duo tempor ut no ipsum labore praesent labore sit ut sadipscing luptatum. Est vel suscipit nibh consetetur molestie accusam eirmod consequat ut esse magna nostrud et ut. Vel eos sed ea consectetuer eleifend clita. Nonumy sea eos amet sit exerci sit qui labore ipsum dolore. Invidunt sea labore dolores sea et et sit praesent sed accusam sit dolor iriure. Augue ut ea luptatum eos sed ipsum sit tempor stet hendrerit eros ut ut eu vero tation. At vero sea et euismod sea stet facilisis sea diam duis tempor eos nisl ipsum tation accusam. Ipsum stet eros accusam eirmod odio dolor dolore justo in ut lorem amet erat diam dolore. Duo aliquyam in diam sed lorem consetetur aliquyam no. Sit et invidunt.
Et wisi et eos quod et ut molestie quod lorem nonumy assum vel stet. Erat tempor facilisi erat ut ut nonummy takimata vero dolore autem sed et nulla dolor amet dolore ut. Et lorem elitr sanctus sed nonumy. Sed dolore eos nonumy lorem duo duo justo clita facilisi justo takimata labore ut amet sed et. Kasd diam magna et dolor sea accusam duo aliquam.