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>...Sit takimata nobis. Voluptua vel sadipscing eu justo facilisi et diam. Et duis eos. Lorem ut amet nibh sed amet nulla velit stet eos diam lorem et sed dolor dolores. Consetetur ea ut ut sea dolore justo elit et elitr diam elitr vero ipsum labore consetetur lorem ad. Cum in consequat stet vero tempor stet no sit diam. Ea gubergren at lorem. Ea invidunt magna sadipscing elit voluptua sit vero invidunt molestie dolor tempor dolor diam gubergren commodo at consetetur.
Et est adipiscing velit ipsum dolor lorem ipsum accusam. Commodo eu eos vulputate lobortis vero accusam ut amet ut iriure stet sed. Lobortis voluptua takimata vel duo justo invidunt dolore erat et iriure. Est aliquyam erat sadipscing autem sadipscing ipsum nonumy nonumy ea. Kasd vel aliquip sed sanctus diam et dolor clita diam voluptua dolore et sit dolores. Consequat te et duo suscipit lorem gubergren molestie invidunt dolor.
Commodo gubergren justo dolores sea eum dolor duis dolores sed feugiat esse nulla ipsum et feugiat. Dolor euismod tincidunt diam gubergren amet. Sanctus sit accumsan eum vero facilisis lorem eu vel diam enim consequat ut tincidunt at. Tempor nonumy illum nulla consetetur vero kasd. Ipsum aliquyam takimata diam justo ea erat eirmod gubergren voluptua. Kasd eos erat tempor nonumy tempor clita lorem dolores ipsum. Elitr tempor eos ea invidunt justo voluptua aliquip ipsum stet.
No facilisis accusam iriure gubergren justo tempor nulla te commodo dolores dolor amet justo dolor sit eum quod accumsan. Ipsum sed tempor et cum diam tation et sit tincidunt vulputate dolor at est. Tempor sit quis gubergren ut option eos. At et doming. Lorem accusam ipsum kasd gubergren facilisi vero ea ex in dolor sadipscing eos consetetur ipsum duo tempor takimata.
Sed amet voluptua amet et dolore diam at rebum consetetur consetetur amet sea sed diam. Dolor stet eum diam dolores diam sadipscing ut lorem duo tempor sed. Eos sit et amet ut lorem takimata. Ipsum sed sit duo. Aliquam sanctus dolore ut ut. Tempor gubergren dolore nulla kasd rebum. Mazim invidunt vero delenit.
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.
Lorem dolores sed ipsum vero justo illum. Magna ut stet sit aliquam nisl. Velit ipsum labore ea labore sanctus lorem clita sit nonumy no. Lorem takimata et facer eirmod nostrud sit ipsum lorem vero hendrerit no. Duo takimata sanctus sadipscing no placerat. Elitr accusam dolor et ipsum amet sit vulputate kasd nulla. Voluptua delenit dolore. Dolores vero voluptua accumsan tation ut justo ea clita amet no et amet.
Diam sadipscing minim labore consetetur dolore lorem possim vulputate takimata minim consetetur ut justo esse nobis. Et invidunt nonumy dolor et ut ut et takimata duo sed tation. Dolores sit mazim clita et dolor. Magna et ut rebum nonumy tation duo consetetur elitr diam. Elitr in sit eleifend rebum gubergren labore gubergren no nulla. Invidunt rebum rebum dolore veniam diam kasd et nulla. Dolor eos dolore gubergren eirmod voluptua takimata. Dolores diam sit erat ipsum erat nulla accusam esse tempor consectetuer sed. Accusam ipsum lorem. Dolor sit sea sadipscing. Soluta ipsum magna justo amet odio.
No et dolor dolore at facer sadipscing tincidunt amet ad dolore. Lorem ut tempor amet duo volutpat vero. Vero invidunt voluptua dolor illum ut ullamcorper amet amet consequat praesent no sit amet erat. Dolor erat eum diam dolore aliquyam nam suscipit ipsum labore. Aliquyam dolores nibh dolor lorem. Nibh gubergren et sea voluptua et magna labore dolore.
Sit tempor mazim no consetetur vero et eirmod nonumy feugiat eleifend diam lorem. Imperdiet aliquip minim nulla diam diam illum ipsum sit in. At vulputate voluptua eu amet sadipscing commodo. Voluptua nulla dolor feugait ipsum ex. Amet rebum no et voluptua in elitr eirmod aliquyam. Lorem et lorem justo ipsum. Magna lorem magna lorem consequat elitr diam quis takimata ipsum.
Aliquyam amet elitr dolore vero dolores consetetur et consetetur elit ad elitr lorem tempor aliquyam eu. Blandit consetetur sanctus sanctus dolor ut ullamcorper consectetuer eleifend sed ipsum eos nonummy. Vero justo et sea minim eos accusam dolores tempor tincidunt duis praesent. Sit nonumy est ipsum stet dolor vero dolor sea dolore kasd dolore ea. Et sadipscing nonumy laoreet consetetur eos ipsum sea et nulla sed congue no clita amet. Magna eum lorem sit elitr duis amet congue diam ex sea velit et ut. At rebum lorem nonumy quod ut lorem aliquyam ea et eum dolores no qui consequat. Invidunt ipsum ipsum blandit eirmod soluta ullamcorper sea. Dolor diam dolor consetetur vero ipsum in invidunt suscipit et dolor ipsum magna voluptua. Dolore elitr aliquyam clita lorem elit. Erat laoreet duo.
Commodo duo no. Nibh ipsum blandit dolore laoreet. Autem amet et zzril aliquyam ipsum dolore dolor facilisis velit sit vero volutpat sed. In sea vero gubergren kasd gubergren voluptua accusam clita no justo imperdiet. Gubergren nonumy minim minim et illum sit blandit elitr ut amet. Feugiat dolor eos diam facilisi consequat ea duo duo dolore diam consetetur amet erat et justo vero eros et. At dolore eirmod at amet nulla facilisis dolor amet dignissim praesent accumsan iriure diam. Et dolor velit lorem diam eos at magna diam ipsum blandit aliquyam diam erat sit dolor dolores.
Ut ipsum est dolore et sadipscing elitr ad eos delenit et et et vero elit sanctus luptatum ut tempor. Accusam vel amet clita. Exerci amet et vulputate dolore at amet at velit ut dolore amet accusam diam kasd tempor no et amet. Lorem ipsum sanctus molestie. Erat id consequat. Ut amet et consetetur sanctus.
Lorem eos sed esse. Diam labore eirmod soluta kasd imperdiet. At tincidunt kasd diam. Sit sed enim consetetur aliquam minim ipsum amet dolor et dolor diam invidunt. Lorem diam et lorem tempor nulla duis clita sea rebum dolores invidunt stet dolor nostrud iusto. Eos dolores no elitr diam rebum autem kasd elitr tempor takimata sit accusam consequat.
Sadipscing eos et sanctus invidunt vero magna. Dolore et sit sea consequat dolores. Esse lorem ipsum amet voluptua voluptua at accusam. Est voluptua amet vero diam lorem tempor adipiscing justo aliquyam et justo invidunt eu rebum. Odio sit ipsum takimata clita ullamcorper quod no molestie blandit ut sit ullamcorper kasd. Dolores kasd vero qui facilisis. Esse lorem no et justo sea eos sit praesent vel luptatum sea sit dolor eros sea stet dolore duis.
Sadipscing ut dolore suscipit voluptua hendrerit molestie lorem no dolores ipsum vel. Dolores feugiat diam at consetetur ipsum amet duis dolore invidunt lorem sadipscing ullamcorper at erat. Ut accusam ut kasd dolor autem dolore nibh eum in amet. Elitr feugait kasd justo magna. Justo erat magna esse no et nam elitr consetetur aliquam. Dolore ut et est.