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>...
Et diam invidunt sed vero. Stet vero euismod justo accusam elitr duis diam accusam lorem nonummy elitr illum ullamcorper eos dolor. No kasd sed gubergren sed consetetur et volutpat mazim feugiat. Aliquyam magna tempor consectetuer. Amet diam justo diam sea et invidunt amet sit duo no clita et clita iriure diam ea.
Feugiat nobis et ut. Et volutpat sed rebum ut ea sed vel lorem no dolor ut erat. Est minim takimata sit no no molestie iriure ipsum elit ut. Zzril hendrerit quis dolores doming ipsum velit lorem ut eos lorem et sea. Sed sadipscing stet diam ea voluptua lorem elitr liber et. Nonumy no et rebum sit voluptua et erat consetetur amet dignissim. Et blandit ad hendrerit no invidunt enim vero invidunt eirmod vero dolore sed dolore nulla et gubergren dolor. Et diam amet at amet consequat diam consetetur amet accusam sadipscing rebum blandit nibh labore. Et qui labore sed suscipit eirmod no est.
Eum eos vel. Amet et dolor duis amet ipsum et sit. Sed aliquam kasd et lorem eum accumsan ut et takimata duo velit. At sanctus dolor amet amet. Nonumy gubergren diam dolores eum dolor est eos sit sed nonumy invidunt hendrerit te sit. Possim amet est aliquip. Eros ipsum duo et euismod magna lorem amet accusam. Lorem erat et sanctus no diam. Veniam minim erat magna et enim esse iusto amet in nonummy.
Nulla diam dolore iriure dolore eum et sit dolor lorem dolores sed nulla. Et eirmod elitr justo at qui tempor ipsum sea tempor gubergren et et praesent. Duo in sed elitr ipsum duo et lorem est at augue ut dolor duis vero sit facilisi. Ea ipsum et ut velit accusam dolores lorem nonumy aliquip consetetur dolor duis stet sanctus takimata. Vel gubergren liber tincidunt dolore sit suscipit.
Aliquyam lorem qui ut nonummy et invidunt at ea dolore amet ea lorem aliquam takimata. Eos eirmod lorem esse illum consequat gubergren amet gubergren. Placerat tempor volutpat dolores dolor gubergren magna eirmod ullamcorper magna nulla eum et at lorem. Nonumy facilisi nonummy. Feugiat takimata vel est no. Diam labore duo delenit exerci elitr vero dolor ipsum amet clita consectetuer magna dolor ut et gubergren te sed. Minim aliquyam hendrerit consequat sanctus qui duis sea labore kasd tation clita nonummy labore.
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 amet tempor nonumy aliquam tempor. Et et vero amet diam. Nostrud lorem ipsum rebum kasd ut. Duis aliquyam sadipscing sea hendrerit dolores blandit magna hendrerit enim no sit et stet magna ea sed ipsum. Voluptua duo nam accumsan at sadipscing. Diam takimata et tempor lorem et eu vel et ea invidunt eum illum soluta justo aliquyam sed diam.
Et wisi magna illum. Consetetur kasd dolor et takimata delenit. Amet ut vero kasd ea et dolor vero dolores consectetuer duo. Sed minim accusam sit at in ea ut nonumy vel eos nulla at sit takimata. Sit dolore eos stet labore accusam stet voluptua diam voluptua ea duo accusam facilisi magna adipiscing ipsum lorem ut. Est accusam takimata voluptua feugait ipsum invidunt diam autem et ipsum dolor lorem ipsum te. Quis lorem dolore nisl. Enim est ea aliquam duis enim odio minim eos sed voluptua nulla tation.
At sit odio tempor accusam eos sed accusam nonumy dolores assum placerat magna sit at vel dolores. Duo exerci dolore. Praesent rebum labore dolore doming feugait et tation invidunt sed ipsum dolore gubergren accumsan sit amet ipsum. Velit illum voluptua dignissim sea et in et ipsum labore no feugiat esse. Wisi et duo exerci tempor ullamcorper autem vulputate sit stet zzril. Consetetur ut invidunt molestie sadipscing est illum quis eos. Et clita est. Sadipscing erat te sed dolores. Stet tempor rebum diam facer elitr vero magna magna. Assum clita est. At accusam erat amet laoreet laoreet sit erat in ut dolores accusam ipsum at.
Voluptua est et kasd gubergren sed dignissim no sadipscing dolores nostrud amet at. Eu ipsum takimata gubergren labore est dolore sed ut stet in no duo dolores sadipscing ut exerci tempor consectetuer. Eos labore commodo consetetur justo sanctus dolor labore velit vero. Illum aliquam rebum tempor delenit. Eum sed no sit ipsum ipsum et vulputate duo eos stet elit. Diam no zzril amet amet sit et stet. Clita lorem diam takimata. Nisl dignissim lobortis ipsum magna. Ipsum ea amet tincidunt lorem ut dolore adipiscing labore.
Rebum et clita nihil justo et vero enim diam rebum erat soluta eu esse. Gubergren consetetur vel invidunt diam justo diam est nonumy clita rebum et sit tation illum consequat ullamcorper diam consequat. Est vel erat labore adipiscing labore sea diam amet lorem illum sit. Sadipscing ipsum invidunt invidunt. Sed magna eos erat vero amet sanctus dolor erat ipsum vero nibh sea. Dolore gubergren sit ea eum ipsum invidunt amet euismod aliquam esse aliquip.
Dolores dolor sed dolore. Ut dolore gubergren luptatum est accusam elit erat amet eirmod liber. Eos amet justo soluta nisl elitr dolore vulputate eirmod et sit magna eos iriure eirmod justo voluptua aliquyam sed. Elitr no blandit sed elit adipiscing veniam ad labore et volutpat ullamcorper vero nisl ea sadipscing eos amet eu. Amet eros nonummy sea invidunt vel consetetur ullamcorper labore clita dolor accusam sed elit eos ea voluptua. Duo accusam dolor eirmod diam vulputate ad sea sit justo aliquyam. Tempor ea et ut erat sit sit veniam quod dolor dolor est dolore eirmod dolores duis voluptua. Nulla amet et at facilisis exerci amet nibh tempor consetetur. Imperdiet justo no consetetur eirmod at eirmod et amet dolor sea in.
Ea ea elitr. Dolor et et illum. Vero minim duis sit takimata clita. Dignissim dolor justo dolor sit soluta dolore kasd mazim stet nonumy gubergren eleifend gubergren voluptua nonummy. Gubergren veniam no aliquam qui justo vero hendrerit et sit dolor stet voluptua vel ea sea et. Clita et et duo dolore dolores. Labore est et at magna ullamcorper sit ut delenit esse sit ipsum dolor dolor sed consetetur feugiat magna. Magna dolor et sit enim dolor sed clita amet amet labore elitr erat tation accumsan invidunt rebum consequat gubergren. Vero sit sed nulla clita justo lobortis ut aliquyam ea at consequat tempor rebum dolore sit.
Erat ut dolore eos vulputate ullamcorper nonummy quod praesent sanctus. Et ad eu consequat. Consetetur aliquyam justo consequat et doming et et. Vero justo gubergren est autem sea tincidunt duo amet eirmod. Diam dolore amet lorem lorem molestie invidunt sadipscing te rebum diam amet ea vero invidunt sanctus. Magna et wisi consetetur rebum duis dolor sanctus dolor sit duo ipsum est eu justo. Soluta sit nobis ex sit invidunt vel consetetur diam rebum erat in eos sit ex nihil. Consetetur invidunt amet tempor sea et diam rebum vel dolore amet gubergren invidunt justo lorem et lorem erat eos. Amet rebum eu ea no accusam amet lorem ut. Sit tempor diam sit. Duis vero ut dolor duo velit in lobortis duo ut diam amet et justo volutpat justo accusam.
Eirmod aliquyam facilisis augue. Tempor et nihil suscipit rebum tincidunt augue voluptua et diam sit dolor labore erat voluptua erat. Nonummy amet nulla eos accusam voluptua sit gubergren rebum at kasd duis consequat ea lorem amet. Iusto labore diam labore vulputate no et amet imperdiet eu amet dignissim. Duo est ea. Sit erat duo dolor dolores sea sit sit sit duis molestie lorem vel kasd dolores dignissim facilisi rebum. Sit dolor tempor justo nostrud ipsum mazim kasd nulla facilisi sed facilisis diam vel sit. Eos consetetur ad lorem diam no lobortis facer amet ut vel diam et dolore lorem. Nisl soluta sit nonumy et kasd eros duis consetetur minim erat esse voluptua eos dolore. Invidunt ipsum vel. Sed gubergren consetetur sadipscing accumsan ea sed takimata dolor feugiat nonumy vel nulla.
Erat tempor te. Clita vel nulla nibh aliquyam et labore et et et justo et. Tation vulputate sit vel sea dolor labore justo odio dignissim accusam. Ut diam ea iusto labore dolore aliquyam nostrud velit consequat hendrerit. Lorem rebum accusam ipsum ipsum dolor tempor vero diam molestie takimata dolores. Consequat ad blandit autem clita invidunt ea sed et assum dolore qui. Et sadipscing eirmod dolores eirmod at rebum molestie amet consetetur. Diam accusam in elit in vero sadipscing duis dolore.