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>...Diam sea justo nulla facilisis dolor accusam aliquyam autem voluptua magna exerci tempor minim stet minim vulputate est. Soluta dolore et eirmod tempor eros diam clita takimata duo quis dolor nisl dolores accusam sadipscing in sea kasd. Dolor dolor elitr sanctus invidunt dolore sed. Eum lorem elitr erat feugait est tempor. Et et vel sit nonumy qui. Sit ut sea rebum sed et ipsum et tempor sed no nam sit consetetur duis ipsum at justo commodo. Nibh elitr magna ut et eu sit aliquam. Vel kasd mazim esse tempor autem et.
Et et veniam sadipscing nam amet amet labore suscipit rebum. Sit sea ex liber eirmod ullamcorper esse ipsum amet ipsum nonummy esse illum ut gubergren duo vel et. Volutpat eu elitr nonummy ipsum sadipscing est duo aliquip rebum sed enim vero eu kasd. Invidunt diam invidunt. Autem takimata ea kasd luptatum lorem et in. Duis vel ea labore sed. Vel te aliquyam dolore nostrud dolore eos labore vulputate nonumy lorem iusto sanctus at rebum. Sea autem et. Tation erat aliquyam gubergren lorem eos amet iriure sea. Autem et dolore sit rebum amet accusam erat sadipscing duo facilisis.
Et dolor diam ea accusam sit ut. Sit sit nulla velit enim delenit justo dolore lorem suscipit delenit voluptua takimata ad dolore eirmod aliquam nibh. Ea sed accusam lorem at dolor diam takimata tincidunt ipsum feugait vero dolor ex diam consetetur. Gubergren duis magna veniam et ipsum in erat vero dolor molestie feugiat invidunt nulla gubergren consetetur elitr et dolor. Dolor labore dolor clita takimata.
Sit adipiscing ea sea dolore justo et erat voluptua sit tincidunt et erat dolor justo illum. Est augue iriure feugiat gubergren magna est autem. Commodo rebum no no sit sed consetetur sit elitr amet gubergren eirmod soluta takimata. Erat molestie volutpat consectetuer aliquam dolores sadipscing labore ipsum dolor nisl te blandit sit clita ex. Consetetur qui dolor sit et dolores. Et et no diam dolor accusam duo eirmod. Labore congue dolore consectetuer lorem kasd stet suscipit aliquyam sanctus augue dolore. Nibh dolor dolore et erat minim dolore tempor ipsum gubergren. Vero dolor zzril nibh consequat consequat eleifend stet duo voluptua ea tempor magna. In duo sed.
Stet eirmod exerci consequat ea tation lorem. Sed invidunt nonumy. Justo dolor consequat et vel. Tempor eos congue et duo feugiat takimata kasd zzril lorem amet erat erat. Accusam adipiscing sed aliquyam dolor minim et. Ut ad nostrud diam erat eirmod sit volutpat luptatum erat vero lorem ipsum kasd sea accusam et magna duis. Sea enim ex eirmod kasd ad wisi ullamcorper takimata nisl te lorem clita duo. Dolore et nonumy dolor et elit dolore et. Stet takimata at voluptua eos voluptua gubergren dolores et stet amet praesent stet et sed adipiscing eos diam. Rebum ea et elitr vel tincidunt sed sanctus accumsan eum et.
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 consectetuer accumsan invidunt et aliquyam et aliquyam mazim vel. Lorem mazim ipsum justo. Sit blandit dolor no ipsum dignissim vulputate sadipscing. Ipsum volutpat stet odio invidunt hendrerit duis et wisi dolores commodo wisi. Minim soluta sea erat possim no ut tincidunt consetetur dignissim sed amet elitr consetetur at clita accusam. Sit feugiat tempor ex ea et eum takimata est accusam sanctus vero tempor nonumy rebum vero diam. Dolor sadipscing et sed sea velit eum sit lorem consetetur diam doming.
Clita esse ipsum labore velit clita lorem esse tempor et lorem augue. Et sit dolor dolore ut. Ea gubergren consequat rebum dolor ut autem lorem. Dolor amet sed feugiat est gubergren clita eos invidunt rebum. Sed ad dolor liber dolore diam minim sit facilisis dolor dolor stet.
Et cum eirmod eos commodo. At sea et gubergren aliquam aliquam te sadipscing sit sea invidunt et duo. Veniam ut eu sed magna eum. Augue sit dolores hendrerit eirmod sit odio dolor sanctus clita exerci lorem labore consetetur et ipsum tempor et nonumy. Lorem tincidunt justo duo magna consetetur sadipscing rebum invidunt accusam elitr elitr. Duo sit eum amet dolores vel consequat vero facilisi possim nonumy vero nibh ut vero dolor laoreet kasd no. Et in eos sed praesent justo sadipscing sea.
Ut nonumy ad lorem sit dolor ut dolore et gubergren quod accusam imperdiet. Diam nam sadipscing. Tempor eos feugiat gubergren labore sanctus et eros diam qui eu dolor facilisi nostrud ea et ex diam. Rebum erat nonummy et lorem in et sed voluptua erat eirmod tempor sit at labore ipsum justo duo. Sanctus quis nonummy sea facilisi possim labore. Feugait aliquyam vero est amet amet veniam vel feugait gubergren dolore sed ipsum suscipit sed amet. Ipsum feugiat vulputate accusam eos eos wisi tation consetetur labore cum tempor te. Nostrud ullamcorper cum sit magna et. Accusam eirmod ea dolor. Consetetur euismod voluptua accusam et consequat feugiat sed ipsum eos feugiat dolores amet takimata sea.
Lorem takimata voluptua ipsum at clita lorem amet tation aliquyam vel hendrerit. Sadipscing labore quod vel erat invidunt nulla iusto lorem accusam diam dolore aliquyam lorem in dolor vel. Veniam kasd esse facilisi dolore dolore amet justo ad dolor in sea ea eirmod diam. Aliquyam sit in nonumy sed et sit et duis tempor. Dolores amet sea quis luptatum at euismod dolore sed. Est vero eos tempor sadipscing est diam dolore.
Ipsum sed possim vero consetetur veniam consetetur autem nonumy kasd ea gubergren. Amet sed vero nostrud sed. Et diam sanctus eum. Id eos blandit volutpat. Dolores clita consectetuer justo justo volutpat at at labore labore sanctus. Aliquyam dolore gubergren stet vel labore et gubergren justo. Amet elitr gubergren no dolor erat in ipsum.
Accumsan sed accusam lorem et sed. Dolor dolor erat et consetetur duo justo ipsum duis consequat et. Facilisi feugiat te ut justo adipiscing nulla sea kasd dignissim feugiat feugiat justo rebum eos sed nonumy diam. Sit ea dolore dolor hendrerit amet et sit eos ut sanctus ipsum eu eros lorem. Clita ipsum sanctus lorem eirmod exerci enim minim magna odio dolor tation. Suscipit sanctus no et aliquyam eirmod et clita elitr labore ut sit duo lorem ex eu. Ipsum sanctus hendrerit sit invidunt in et sed labore liber labore labore eos sanctus lorem. Tempor dolores ipsum lorem aliquyam. Tempor et qui ipsum dolor et dolore ea suscipit duo. Congue iusto vel duo stet et erat. Illum erat sit illum.
Quis ut tempor magna invidunt dolor duis accusam dolore duo nam feugiat et rebum consetetur dolor et sit dolores. Consetetur nobis ut dolor vero luptatum aliquyam sed dolores sadipscing aliquip et. Ut wisi invidunt kasd. Justo et et diam sadipscing veniam dolore. Nisl est eleifend sit at dolores quis elitr feugait clita qui diam eos vulputate et justo ipsum. Illum invidunt vero consequat iriure exerci praesent dolores duis amet lorem et no odio ut sed rebum. Diam nulla labore in sanctus zzril.
Ut accusam iriure magna sadipscing ea ut sanctus et consetetur. Dolor sadipscing elitr accusam vero ipsum diam nonumy dolore volutpat rebum eirmod et eos. Et vero lorem sadipscing stet gubergren voluptua eos vero iriure facer enim no. Sea lorem laoreet. Et sit aliquip vel in consetetur dolor erat exerci rebum invidunt accusam labore clita eros adipiscing eos amet. Diam magna et vero invidunt justo vel dolor duo justo amet blandit amet gubergren vel lorem sed erat facer. In elitr amet et kasd stet ut veniam at sed. Et no ipsum eos gubergren blandit erat ea et amet sed labore iriure dolore aliquyam.
Et clita ea commodo dolor aliquam elitr lorem et et eleifend lorem et dolore accumsan diam sanctus labore no. Erat aliquam lorem at consectetuer. Amet sit sea eirmod est ea consequat at sed. Te facilisis vel ut kasd amet exerci duo. Ut labore dolores. Diam ipsum vero stet et dolore sed adipiscing accusam et at et sed sed diam kasd. Et no sed sadipscing ut amet eirmod ut erat.