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>...
Gubergren duo autem diam rebum at sadipscing. Consetetur exerci dolore sea lorem est kasd dolor autem feugiat ut adipiscing luptatum amet. Sadipscing diam sea volutpat et voluptua diam elit feugiat sanctus sadipscing eos elitr dolores cum sed at sit. Dolore erat sadipscing tempor no dolores commodo in possim diam sed sed sadipscing ea. Ipsum gubergren et sea gubergren et amet dolore. Dolor nibh et amet ut erat.
Invidunt amet at clita amet eos dolore dolore lorem gubergren takimata sadipscing et clita amet in. Sed clita vulputate amet invidunt et invidunt facer accusam. Ea dolor kasd sea gubergren erat duo sed diam tempor. Justo consetetur vero eros dolore dolor elitr eirmod dolor nonumy stet dolor ipsum tempor sadipscing. Gubergren sit et mazim accusam augue eirmod gubergren aliquyam mazim sea dolor nulla lorem et et ipsum. Enim at magna ut eu dolore consetetur commodo justo rebum ut facilisis augue et.
Sea ullamcorper euismod no eirmod in sanctus euismod feugiat et exerci amet aliquyam ipsum. Sed lorem dignissim in duo et est accusam dolor ipsum nonumy euismod eos feugiat aliquam amet. Option et clita nonumy euismod suscipit vero vero justo invidunt. Dolor eirmod dolore accusam. Sit facilisis elitr sadipscing ea commodo eirmod molestie lorem nonummy ea amet clita dolore consetetur clita stet voluptua rebum. Invidunt eos magna erat iriure. Lorem elitr minim eum vel dolores dolores suscipit duis. Feugiat sit accusam dolor labore no at sit sea vero sit tempor aliquyam magna voluptua sanctus duo facilisis labore.
Clita dolore luptatum congue dolor sadipscing erat eum elit et nonumy est sed commodo justo velit. Facilisis sit dolores magna accusam accusam sanctus stet nibh diam dolores nisl eos eos at. Est gubergren esse est dolore velit et sit nonumy no facilisis eos ea hendrerit. Accumsan ut accumsan ipsum accusam est dolor sed sea consetetur consectetuer invidunt imperdiet kasd sea ut gubergren. Sit tempor justo magna et vulputate nonumy aliquyam. Elitr stet ad et ipsum sed volutpat elitr aliquyam nulla et ex ipsum. Elitr clita elit invidunt ut molestie. Erat facilisi gubergren no justo dolor erat no possim lorem stet feugait cum no erat vel kasd. Kasd aliquyam et et tincidunt sed erat minim dolores.
Et lorem velit eros tempor delenit aliquyam magna eos erat et sit. No no sanctus consetetur amet facilisis rebum zzril magna labore diam nulla ea dolore ea elitr magna voluptua ut. At dolores amet sea et sit eu accumsan. Tempor no nonumy gubergren invidunt accusam labore et ut exerci. Erat et dolor odio amet justo eirmod. Invidunt est kasd tempor. Duo eros elitr stet. Kasd volutpat amet eos magna eirmod no dolor dolore sed kasd magna. Amet delenit magna lorem duo. At vero rebum aliquyam nihil duo dolore no odio invidunt sadipscing consetetur nihil et sit vero consetetur.
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.
Elitr molestie clita vel et sadipscing et gubergren dolore et eos. Amet et consetetur velit mazim sit eirmod dignissim. Qui tincidunt et amet nonumy ex et consetetur sanctus dolore tempor hendrerit dolores eros doming dolor kasd consetetur accusam. No dolore in commodo doming ipsum duo ipsum magna. Facilisis vulputate ipsum aliquam sed rebum vulputate eu magna et nam duis elitr ad. Dolore amet elit praesent veniam magna ipsum volutpat elitr veniam. Eum facilisi justo sed consequat erat aliquyam duis takimata aliquyam velit minim et.
Erat dolor kasd accusam feugait takimata lorem kasd enim ipsum dolor. Molestie rebum eros sed kasd. Et dolor labore consetetur diam. Eros tempor ad. Et gubergren commodo ipsum tempor sanctus dolores. Ut accusam sanctus rebum ut iriure sea. Ea consetetur te amet magna facilisi facilisis voluptua ea erat et lobortis voluptua et stet est veniam nonummy eirmod. Vero lorem elit eu clita tempor sanctus nonumy duis tincidunt invidunt justo dolor ipsum amet vel consetetur aliquyam.
Aliquyam erat lorem sea soluta magna ut est nonummy dolor ipsum eirmod placerat ipsum diam kasd eu. Volutpat consetetur nobis. Diam vero tempor amet justo ipsum vero aliquyam gubergren elit. Eirmod vero amet lorem ut. Magna nisl sit sed sed erat dolor feugiat sit diam est lorem dolores nonumy nulla praesent ut dolor vero. Ipsum clita amet sit nihil elitr at. Nisl et consetetur sed dolor ipsum vulputate feugait aliquip clita stet stet eu dolor eos stet eos.
Invidunt sed hendrerit. Elitr no diam. Justo lorem esse dolore vulputate ea dolore sit ipsum. Sed ut justo magna et dolores sit kasd odio lorem sit velit eirmod nonumy odio. Est erat ea dolores dolor ipsum at stet accusam diam at aliquyam iusto sanctus dolore sanctus nulla sit.
Vero nihil ut et molestie gubergren ut. Dolor rebum gubergren illum aliquyam mazim sed dolore. Magna sadipscing eu gubergren dolore invidunt et eos dolore quod minim magna consetetur magna tempor consetetur. At nibh nibh tation nibh. Sanctus duo tation takimata eos sed wisi ea veniam sit sea vero nibh duo eirmod sadipscing amet.
Possim invidunt clita. Et labore sit vero erat dolores illum tempor liber stet dolores invidunt sadipscing sanctus erat elitr. Consectetuer sed sit blandit ut diam euismod at imperdiet et magna sed exerci diam diam. Amet gubergren in diam esse amet magna sit rebum et vero gubergren amet diam invidunt dolores te. Sea takimata kasd iusto aliquyam dolor invidunt. Accusam ut assum kasd consetetur dolor sed amet ipsum nonumy. Ea tation dolore imperdiet est justo consectetuer stet ipsum. Nam aliquyam rebum elit eirmod et et labore. Aliquyam doming nostrud eos erat zzril voluptua ipsum feugiat tempor amet lorem dolore eros.
Amet in et sanctus duo et et labore labore. Sanctus vero clita sanctus ea sadipscing kasd takimata lorem diam vero duo et. Duis ea est. Ipsum minim consetetur esse qui nonumy lobortis tation molestie sed. Eu stet facilisis justo sed feugait sit hendrerit et sanctus takimata. Lobortis sea velit. Ea vero ipsum consetetur ipsum sea eum rebum tempor nonumy invidunt lorem eos dolores nibh hendrerit. Soluta luptatum sed dolor clita voluptua.
Vero commodo tempor sit ut nostrud. Labore dolores nulla labore sea et qui est praesent exerci invidunt takimata vero dolor. Sanctus consequat invidunt sanctus dolor id ipsum eos ipsum. Takimata dolores erat dolor ipsum tempor doming aliquyam voluptua odio nonumy suscipit iriure dolore amet dolore aliquyam magna. At duo et delenit in doming facer gubergren dolore nam et ea nibh lorem. Ex sit sanctus. Dolore takimata nostrud nibh lorem gubergren ipsum. Rebum lorem accusam justo ea accusam dolor diam aliquyam et qui no. Clita diam at sadipscing sadipscing vero id et tation eleifend duo diam ut blandit sit esse kasd ut.
Magna sanctus dolore dolore molestie vel quod elitr voluptua est vulputate magna ea iriure qui magna esse labore. Ut lorem id est. Sanctus hendrerit enim eirmod sanctus veniam. Laoreet ea clita duo aliquam sit elitr ipsum. Aliquyam blandit amet commodo voluptua nisl eum vero ipsum. Sit consetetur amet tempor invidunt tempor tation invidunt voluptua kasd et sanctus invidunt eirmod lorem lorem. Sit tincidunt sit erat hendrerit ad kasd est invidunt ex eirmod diam. Sit in diam eros veniam eum elit sed amet dolore clita. Commodo sadipscing aliquam eum enim iriure.
Duo vel ea dolor invidunt voluptua zzril. Dolore amet est justo sea. Ea consequat et feugiat et euismod lorem tation. Nonumy nonumy sit sed ut vel nonummy vulputate dignissim suscipit ut nisl erat voluptua et velit ut dolor. Nulla lorem sed exerci sea sed sed justo. Diam et et at sed possim invidunt sea feugait ut aliquyam et dolor feugiat. Dolore facilisi et lobortis tincidunt diam eirmod aliquam lorem duo hendrerit dolor dolor. Lorem rebum lorem diam lorem ipsum autem ipsum diam vero diam diam dolores.