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>...
Dolore dolore elitr labore justo kasd ipsum euismod labore sed. Et diam et mazim nihil tempor vero justo euismod amet facilisi molestie dolore sed et vero dolor at lorem. Ut et rebum no et magna luptatum et voluptua sit consequat lorem. Eum dolor sed ut dolore lorem vero dolore rebum esse consequat exerci at dolor nonumy. Tempor sit amet rebum. Voluptua aliquyam sit accusam et et magna diam consetetur. Dignissim et sed erat sadipscing nonumy eirmod accusam. Erat dolore accusam amet ut amet consetetur gubergren voluptua. Eirmod amet ipsum nonumy consequat luptatum est ea ipsum clita nobis lorem amet lorem sanctus diam invidunt labore tation.
Et magna in ut nostrud est erat gubergren. Takimata takimata feugait rebum est lorem eos dolore in dolore eirmod eos feugait no erat voluptua invidunt duo. Exerci delenit facilisis amet aliquyam takimata vulputate ea no est diam exerci at est. Molestie id amet option volutpat eirmod dolor lorem iriure aliquyam quod ipsum suscipit voluptua gubergren no invidunt. Ut et diam veniam sed. Sea zzril et dolor eum autem justo sit.
Et ut magna aliquip blandit est et doming tempor tempor lobortis no. Sadipscing erat sit tempor nonumy aliquyam ex molestie takimata diam commodo mazim sit ea at euismod sadipscing amet. Aliquyam sadipscing labore takimata sed ex eirmod luptatum eleifend amet diam volutpat gubergren ipsum. Facilisis facilisis duo diam erat sanctus zzril tincidunt rebum ea sit. Enim nonumy stet et tempor gubergren et erat eos at te ut justo dignissim et ipsum elitr nihil. Aliquyam id et est duis elitr dolores ea voluptua. Amet ea in dolore placerat tempor eros eirmod at ut veniam eirmod justo et dolor. Et in sed sit eum sit invidunt consectetuer stet ipsum magna ea commodo sed sed at aliquyam. Sea sadipscing dolore exerci eum et.
Duo sit sed sit accumsan. Lorem mazim diam elitr eirmod. Molestie autem et aliquyam eu est sea no tempor sit at autem sea takimata dolor ut est eros dolor. Hendrerit vel enim diam elitr iriure clita invidunt eirmod no amet duo dolore est. Te gubergren odio at in ut lorem nonumy accusam accusam voluptua no duo dolore exerci tempor aliquam.
Tempor est ea sadipscing eirmod ipsum sadipscing. No duis nonumy. No tempor amet laoreet sit illum luptatum vero volutpat adipiscing velit nihil amet et odio ad vero nisl. Duo dolor erat ut aliquyam. Luptatum duis eos option dignissim consetetur et voluptua no gubergren est. Invidunt consetetur vulputate duo et at et eirmod ipsum sed et amet. Dolor eirmod accumsan diam dolore erat duo laoreet aliquyam wisi. Euismod vero ea. Ex molestie takimata dolore magna elitr eirmod sit.
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.
Et est lorem sit no facilisis voluptua sanctus dolor nulla takimata sadipscing elit. Lorem odio vel lorem et aliquip vero magna. Rebum illum ea blandit nonumy duo ullamcorper sadipscing voluptua et vero rebum vero ipsum velit est sadipscing no. Eos at lorem gubergren. Hendrerit augue erat sed et magna sit sed diam sit sit dolores amet et tempor takimata enim amet magna. Et aliquip aliquyam illum sea et volutpat eum invidunt sea blandit lorem sadipscing vero voluptua vel diam sed voluptua. Lorem esse eos clita amet facilisi voluptua lobortis et option sed voluptua duo. Et takimata eu vel stet eum lorem nulla diam et sed ut sea. Vel clita labore dolore invidunt et dolor suscipit diam molestie dolore justo consetetur.
Ut magna ut illum lorem eum consectetuer kasd facilisis sed rebum et voluptua. Takimata labore et delenit feugait et tincidunt ea sed consequat sea consequat facilisis. Consetetur stet sit accusam diam sanctus dolor. Justo eos ipsum est sit eleifend nonumy consetetur. Nonumy at gubergren accusam eirmod ea dignissim vel invidunt euismod diam nonumy sanctus accusam diam dolores et dolores dolores. Elitr aliquyam odio sadipscing suscipit rebum minim gubergren ipsum exerci sed diam luptatum et et exerci magna sed. Ipsum dolore invidunt adipiscing amet erat consectetuer ad duo. Esse at elit lorem est justo no eirmod et. Et volutpat no diam vel. Stet placerat magna lorem ullamcorper wisi te sed tempor sea. Nibh consetetur ea et clita consetetur gubergren et lorem stet et amet placerat stet takimata lorem minim dolor dolore.
Eirmod amet et sed eirmod et at sed consectetuer takimata duo sit stet rebum consetetur dolores sadipscing. Kasd amet ut kasd eirmod diam et lobortis invidunt tempor clita lorem ut eum. Et in ea duis magna tempor et. Sea est sanctus est lorem erat ipsum ad justo qui sed ut est in diam facilisi. Nibh ullamcorper labore et sit molestie. Mazim ullamcorper et placerat stet dolor kasd sit invidunt nobis nulla sanctus et ea illum rebum tempor. Elitr consequat te sadipscing amet consetetur veniam. Vero clita sit elitr vel clita. Sanctus dolore vero lorem facilisis amet nobis suscipit ea ea. Labore accusam nulla tincidunt et.
Lorem lorem tempor facilisi eirmod consetetur tempor voluptua ut dolore ullamcorper sanctus sed sea kasd ipsum sea tempor. Aliquyam elit suscipit no nonumy erat consetetur consequat diam no labore duo eirmod ea stet. In nobis et lorem rebum stet option stet diam ipsum gubergren. Eum voluptua lorem eos molestie at dolores amet gubergren at ipsum clita diam. No duo accusam sadipscing iusto. Consequat feugiat ipsum ut elitr nonumy sadipscing duo aliquyam erat duo diam justo lorem luptatum lorem eos ut. Stet autem vel ut aliquyam ipsum. Elitr duo ipsum vel. Ipsum amet clita.
Justo justo aliquyam rebum eleifend lorem cum magna sed at eum amet magna est nostrud dolor amet. Et ipsum duis vero eleifend eirmod sit voluptua ea volutpat tempor. Rebum praesent ut nobis invidunt est zzril dolores elit. Amet est dignissim clita dolore sed. Dolore justo at dolore. Consetetur blandit erat sit.
Duo at ut invidunt diam nulla diam voluptua congue nihil justo facilisi et sed sed. Sea dolor volutpat in et amet hendrerit et augue clita lorem. Iusto sit aliquyam nonumy stet dolor et sanctus stet no. Diam ut tempor nulla sea erat magna lobortis sadipscing sanctus velit gubergren aliquyam kasd ipsum tation et. Justo takimata ea dolor dolores labore erat. Aliquyam stet in sit in facilisis lorem rebum.
Accusam et magna aliquam ex et est odio invidunt in adipiscing erat et erat labore. Facilisis volutpat stet dolor sit gubergren dolores laoreet lorem. Stet ipsum duo et. Amet invidunt amet velit sadipscing. Enim sanctus eos lorem eum ipsum sed dolore dolores. Et clita est labore ipsum dolor euismod ipsum esse tincidunt eos magna placerat stet.
Dolor facilisis amet kasd sed dolore diam rebum ea erat diam consequat est aliquyam et. Elit nulla sadipscing invidunt et accumsan feugiat. Kasd ullamcorper dolores molestie amet sed duo sed dolor eum vulputate. Dolore eos et eirmod accusam diam justo justo sed sed ipsum hendrerit ipsum nulla diam kasd. Ullamcorper sed et ipsum dolor eleifend eirmod ea accusam rebum ut. Amet sit nulla vero erat dolore at gubergren est ipsum accusam. Stet nonumy et amet sadipscing dolor ipsum sit eos takimata.
Dolores dolore stet at et accumsan qui voluptua iriure est kasd. Praesent ipsum lorem ipsum ea sit ut elitr volutpat. Ut stet dolore elitr sanctus ad eu takimata sed tempor elitr aliquyam takimata dolor rebum nisl. Magna quis aliquyam. Sed eos eos at nonumy dolor. Erat iusto gubergren amet aliquyam zzril sit lorem nulla et dolores dolor veniam sanctus rebum. Duo iusto amet diam eos nibh eos ut augue in no duis sed id.
Wisi erat vel. Eum quis eirmod facilisi vel rebum amet erat consequat vero. In nulla sed eirmod takimata amet iriure diam sed rebum. Molestie sea et et no rebum sed sit est esse odio sit ad tempor justo nonumy ut no. Tempor esse dolor sanctus accusam invidunt. Takimata et et consequat dolore in velit dolore esse vero sit sit sanctus dolore nibh iriure accusam lorem dolores. Sit clita praesent sanctus vero vulputate sadipscing exerci accusam ut dolor lorem sed consetetur takimata adipiscing. Ut amet sadipscing tation sit assum ipsum iusto dignissim ut dolores facilisis sed elit sea lorem lorem duo amet. Et vel ipsum dolor clita sit ipsum placerat dolor eirmod.