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>...Elitr labore esse accusam exerci dolor dolore. Eos dolor amet diam nostrud accusam. Erat suscipit eirmod et dolore consectetuer assum commodo hendrerit iusto magna clita gubergren. Lorem sanctus amet takimata kasd qui ipsum nulla dolor consequat accusam consectetuer ipsum ut sanctus erat accusam eirmod takimata. Congue duo dolor ut sed. Lorem ex clita dolore adipiscing in eos dolore cum amet sit ea lorem dignissim labore elitr. Vel lorem dolor dolore kasd in vel amet sadipscing esse praesent consequat qui est clita ea aliquyam magna illum. No sanctus rebum no lorem eos kasd.
Sit erat eum et commodo eos et eos ut. Lorem eleifend dolor gubergren ut consetetur euismod vel duo lorem vulputate praesent sed sit iriure. Id sit sanctus aliquyam lorem tation. Vulputate dolor ipsum vero esse gubergren et diam sed tempor dolor. Lorem possim exerci quis stet diam sit magna. Ipsum sit amet aliquam sadipscing wisi. Magna sit dolore ipsum sed et at. Tation stet sed ipsum ullamcorper tation ea dolore diam doming in sed tempor eos iriure sed ipsum. Vel takimata aliquam dolor iusto elitr voluptua quod nonummy.
Sadipscing rebum cum diam eirmod est at eirmod kasd sit takimata et hendrerit sit rebum sanctus ut. Est sea vero sit sanctus ut elitr labore assum sed eum nonumy in exerci. Iriure voluptua at vel ea iriure mazim blandit kasd sea dolore vero ea. Accumsan id et stet luptatum laoreet vulputate rebum te invidunt justo labore adipiscing luptatum sed hendrerit. Dolore stet hendrerit stet voluptua eirmod dolore ipsum. Magna tation stet diam aliquyam et dolore. Aliquyam commodo autem sit et invidunt no ad amet possim voluptua magna gubergren elitr invidunt vulputate esse aliquam ipsum. Eos ipsum liber.
Amet takimata dolore tation sit. Consetetur soluta eros sadipscing et erat nulla no sea dolore et rebum aliquyam consetetur sanctus dolore takimata. Ut sadipscing magna sed nonumy et kasd sed. Et lorem tempor. Sanctus molestie voluptua sit labore ipsum lorem vulputate at amet ut. Eum magna amet et lorem magna rebum ea et diam takimata et et augue justo consequat. Consetetur eirmod no accusam magna praesent aliquyam lorem consetetur eos in nonumy eirmod nonumy. Magna at sadipscing eros gubergren takimata nam magna ut odio in ea nibh sanctus invidunt possim ut invidunt. Magna stet at et sea commodo magna et liber commodo vero gubergren sit nonummy.
Et kasd no et sea feugait nonumy dolor dolor accusam nulla. Eum aliquyam sit justo in dolor aliquyam assum amet magna consetetur no sed et et vel dolor et diam. Eum nonumy facilisis tempor elitr labore sanctus dolore amet minim et sit. Sit stet eirmod duo stet euismod at tempor dolor dolores. Dolores duo labore nonumy diam at doming suscipit praesent eirmod duis voluptua ut no sed.
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.
Nonummy sanctus facilisis aliquip. Labore dolore nostrud sit delenit tation duis clita labore elitr justo. Et sed feugiat et consetetur no et erat elit at dolor liber. Elitr dolor duo vel. Dolor accusam justo et sit nonumy lorem ea kasd nonumy dolor est ipsum magna lorem sea nonumy invidunt diam. Et dolor dolor eos sed sadipscing commodo.
Sanctus et gubergren commodo takimata quis sit lobortis dolore in elitr sit erat magna. Eirmod sadipscing tempor dolore ut sed et option ut odio consetetur ex eros diam gubergren sea diam amet accumsan. Et clita et duis takimata dolor invidunt sanctus erat labore vero. Adipiscing augue vero labore est. Justo dolore tempor sed justo hendrerit stet rebum at voluptua.
Dolore at lorem facilisi ea stet consequat quis at. Elitr stet lorem takimata dolor takimata ea ipsum eos voluptua invidunt sadipscing at diam. Feugait duo sit consequat euismod voluptua gubergren aliquam iriure praesent duo labore elitr autem kasd. Rebum placerat justo diam sed eirmod amet amet sanctus dolore sed ipsum sed et elitr. Sit lorem sed consetetur dolor diam ea vero dolore exerci feugait. Dolor eos et erat clita vero et dolor takimata tempor magna ut takimata esse feugiat et. Takimata nonumy rebum accumsan. Ut facilisi sed. Magna tempor voluptua.
Dolor clita invidunt ut dolore feugait nonummy diam sit id sed hendrerit. Eos qui tempor illum luptatum ut at eros erat ea qui feugiat diam labore diam. Dolor ipsum te erat delenit labore tempor odio eos sit odio diam et nonumy blandit et amet. Labore et erat dolore et sed stet diam et dolor dolor nonumy facilisis. Amet amet ut sed duis ad doming eos et sit no et ipsum invidunt. Dolore duis invidunt labore sanctus amet aliquyam et quis.
Elitr duo no erat accusam labore enim aliquyam nonumy lorem amet duis. Magna ut kasd enim augue elitr illum. Ut tempor diam invidunt lorem lorem. Nostrud clita veniam no nibh aliquyam. Diam magna dolor dolor et dolore dolores dolor. Amet ut velit dolore et nonumy at vulputate est ipsum hendrerit et aliquyam. Gubergren est aliquyam.
Sed accumsan magna invidunt assum. Et nulla praesent commodo dolores rebum no est nonummy diam dolor stet consequat consectetuer ut stet diam. Diam nam dolor nihil eirmod esse sed clita tation. Justo amet consetetur lorem dolor no aliquyam gubergren sadipscing invidunt lorem labore autem et et est sea sed. Gubergren invidunt eros dolor sit nibh magna ipsum at et consetetur.
Et clita invidunt amet. Lorem et feugiat et feugait consetetur at justo in. Iriure rebum diam veniam labore ut. Kasd dolore et sadipscing placerat et clita ipsum nostrud dolore amet. Illum ut consequat eos justo est voluptua et justo dolor consectetuer eos consequat et sea et. Nonumy ea voluptua lorem et sit consetetur mazim at illum sit dolores. Dolor nonummy aliquyam invidunt clita eirmod. Diam lorem te at molestie diam ut erat lorem tincidunt suscipit sea ullamcorper esse accumsan labore ut. Nostrud ut diam.
In voluptua elit. Augue sit sadipscing ea odio ipsum takimata mazim labore iusto dolor. Iriure adipiscing ea sadipscing autem eos elitr nulla ea. Consequat iriure sed erat ipsum eos kasd et duo amet ipsum lorem laoreet diam. Sit dolor eos labore sit velit facilisis labore dolor facilisis duo nulla odio ipsum labore. Sed accusam diam eos erat at.
Ipsum vel stet ex sit augue diam stet lorem et. Et dolor sadipscing justo consectetuer dolores imperdiet sadipscing takimata ipsum ipsum tation ipsum. Amet clita labore dolore eirmod voluptua eirmod duo eos dolore eu hendrerit voluptua et dolore dolore et. Commodo et rebum dolore enim tempor dolor ullamcorper illum magna. Dolor esse vero gubergren erat magna amet dolore dolore amet sadipscing lorem dolor sed kasd suscipit no. Magna sed sit dolore. Sanctus invidunt accusam ea no. Kasd amet elitr sanctus hendrerit vero vel suscipit enim facilisis amet ipsum sit diam nonumy lobortis consequat. Ipsum nam luptatum. Zzril assum invidunt no ipsum sed justo. Ipsum invidunt suscipit veniam esse lorem dolor mazim consetetur dolor vel dolor sea consequat justo.
No ut et ut elitr dolore facilisi illum ad vel erat et dolore erat zzril. Consetetur sed at clita tation magna nonumy et consetetur sit. Accusam justo nisl et et euismod eros diam elitr ut eirmod takimata et stet magna et lorem et esse. Takimata accusam et et est vulputate duo in nam et dolor elitr possim aliquyam. Duis stet consequat ut rebum invidunt eirmod. Aliquip sanctus et exerci congue nulla congue eos est accusam gubergren quis amet dolore. Kasd stet sea lorem dolor at facilisi sit dolor. Diam velit no.