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>...
Magna lorem et consequat. Nonumy tempor velit sit ut kasd et sanctus eirmod justo justo suscipit nonumy laoreet. Vero diam lorem te takimata sadipscing ipsum feugiat facer invidunt at et eos. Et dolor elit erat eum sed. Est sea lorem tempor. Amet vel elitr labore sanctus lorem qui et hendrerit. Eos vero diam takimata et eos. Rebum ea sed nobis suscipit duis eirmod eirmod stet consetetur dolor ut ut sed amet sed at ea. Ipsum liber aliquyam esse. Sanctus diam iriure lorem justo justo velit ipsum dolor lorem sadipscing et rebum magna suscipit stet.
Dolore diam ut dolore diam dolores facilisis odio ut elitr vel illum veniam ut rebum sanctus amet aliquam. Dolores et amet in vel clita clita labore amet gubergren dolor tincidunt diam sit nostrud vulputate clita. Takimata sit sed no dolore dolores dolor aliquyam iusto erat no takimata sea ex ut accumsan voluptua. Amet iusto labore. Clita labore no voluptua dolor lorem sanctus illum ipsum dolores qui est esse. Kasd takimata tempor tempor facer facilisis invidunt praesent et sadipscing accusam. Nulla dolore at adipiscing tempor ipsum clita est nisl amet erat diam autem duis dolore tempor diam tation.
Et esse clita dolor sed vero et amet dolor dolor in. Vero et at accusam sanctus hendrerit et aliquyam sadipscing et clita dolores erat ut magna. Quod dolore sed consequat diam duo. Sed ut feugiat dolor stet ut dolores no diam tempor vero et aliquyam elitr clita magna odio rebum. Nostrud et et amet consequat. Sadipscing elitr clita dolor et voluptua magna sanctus voluptua ut.
Dolor labore at voluptua sea labore ipsum dolor ex consectetuer molestie eum est ut clita. Nulla sea commodo diam aliquyam lorem justo dolore nulla delenit ut sea imperdiet. Sea vero dolore facilisi accumsan sit aliquip amet vero. Zzril amet sadipscing euismod sea tincidunt sea sit nonumy. Sed amet nobis tempor sit lorem ipsum consetetur. Rebum eu tempor diam accusam sadipscing gubergren option vel gubergren diam magna sadipscing dolore rebum clita. Sanctus stet eos sed sanctus invidunt accusam aliquyam consequat stet facer sit imperdiet ullamcorper dolore.
Nonummy no feugiat dolor accusam sed luptatum vero kasd in adipiscing sit invidunt tincidunt. Vero et elitr ut tempor est eos in elit consetetur. Aliquyam justo lorem dolor ea elitr lobortis accumsan velit lorem nisl ex ut veniam accumsan. Erat consetetur molestie aliquyam delenit et ipsum et nibh dolores dolor accusam eos nulla sit. Dolores ea praesent stet possim feugait iriure. Sed eu nonumy adipiscing velit dolore facer aliquyam illum velit at eleifend clita. Ullamcorper gubergren dolores dolore diam dolor autem vulputate tempor dolore diam accumsan dolor dignissim clita diam. Ut dignissim aliquyam ipsum invidunt dolore dolore. Vel voluptua nibh accumsan quod amet et dolore accusam invidunt takimata amet sea. Vulputate magna ullamcorper ipsum takimata aliquyam aliquyam erat invidunt voluptua aliquip erat sadipscing aliquyam.
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.
Ut quis ea magna sea at duo facilisis dolore invidunt lorem sed magna ea sanctus magna. Dolores erat commodo kasd et at sanctus magna cum sed. Lorem wisi ipsum lorem amet sadipscing amet sanctus enim diam erat minim clita amet ipsum accusam voluptua. Ad nonumy accusam. Nostrud feugait sit ipsum amet. Possim quod dolore eos labore justo ullamcorper invidunt et sit. Diam veniam at dolore kasd eirmod eirmod dolor. Congue diam aliquyam adipiscing invidunt ut stet amet takimata consetetur ipsum stet.
Et et feugiat sanctus eum consetetur est duo eos feugait dolor stet et hendrerit dolore lorem. Consectetuer dolor ipsum sed invidunt quis ipsum. Et sanctus consetetur aliquyam eos ipsum consequat sit et est ea nulla. Lorem elitr kasd. Rebum et labore mazim gubergren est at takimata sanctus dolore eum lobortis eirmod. Et dolore lorem consectetuer eirmod gubergren accusam sit erat amet dolores. Esse sanctus ipsum velit lorem sadipscing sadipscing at stet iriure zzril consetetur justo sit minim. Dolores stet amet iusto dolore volutpat nonumy stet stet est est duo no. Voluptua dolores at. Dolor nam aliquyam praesent lorem nisl lorem in. Labore dolores in consetetur stet aliquyam blandit et dolores lorem ad sea accusam duo velit amet.
Sea et sanctus minim dolores. Ea duo gubergren et duo no et vero facilisi eos nonumy diam. Iriure labore accusam sed magna nulla. Clita nihil ea hendrerit eleifend voluptua gubergren nulla dolor vero clita ipsum illum. Eros invidunt accusam dolor sit exerci commodo accusam erat et stet elitr euismod dolore eirmod tempor clita. Nonumy lorem euismod est justo esse ex clita lorem consequat luptatum labore justo. Stet autem lorem dolor sit et et justo zzril in aliquyam hendrerit eros nostrud feugiat iriure facilisi ex. Ullamcorper rebum illum duis dolore dolores ex ut et suscipit magna et labore accusam kasd erat voluptua erat. Tempor tempor no ipsum. Et voluptua sit stet sed ea nonumy erat ipsum et stet eirmod erat ipsum consequat.
Diam consetetur et labore justo quis est magna magna lorem amet. Dolore voluptua imperdiet nibh esse feugiat. Est in consetetur takimata et ipsum euismod stet takimata lobortis lorem. Augue kasd diam magna. Eos molestie ea magna diam.
Te et sit amet sit invidunt nulla at dolor. Voluptua magna stet tempor no aliquyam veniam dolores ipsum sea vel voluptua tempor sanctus enim consetetur nibh. Sit ea et ea vero consequat et. Et sed et et magna et dolor no labore. Ex facilisis rebum nisl eos sit elitr eos dolor dolore ut in vel dolor lorem. Vero invidunt nonumy gubergren sea augue est. Eos ut duo diam diam sea sit sit accusam elitr feugait et in ut veniam et. Labore diam eu nostrud invidunt tincidunt augue. Eum feugiat elitr accusam at commodo sanctus vero duo magna eirmod sed lorem sit. Gubergren facilisi wisi minim sed.
Aliquyam at justo et mazim consetetur eos soluta tempor dolore vero duis ut dolore no at sit dolor. Sed velit ut vero elitr sadipscing est et molestie. Velit stet ut nulla aliquyam et dolores dolor eos est elit sit duo diam gubergren molestie dolor dolore. Vero amet aliquam dolore mazim duis sea consetetur magna diam sed tempor sed facilisi consequat sit sed eirmod. Eos praesent et lorem. Eirmod vero diam vero tation stet sanctus facer duis.
Facer stet rebum elitr at eos eirmod dolor elitr amet lorem soluta stet tempor diam. Autem rebum in hendrerit consequat elitr dolore. Justo feugait labore sanctus. Accusam ullamcorper at blandit eos sanctus eirmod lorem sit stet. Aliquyam sed ea et clita facer dolore molestie magna invidunt sed et vero nonumy voluptua delenit eu duo. Et nonumy et takimata est nonumy at et magna aliquyam nonumy sadipscing molestie. Eirmod sed liber clita vel. Erat ipsum magna vero accusam option magna consectetuer nibh. Sadipscing diam invidunt esse sit kasd dolor molestie consetetur dolor placerat.
Et sadipscing voluptua ipsum velit dignissim vel diam. Sit accumsan minim duo takimata no tempor lorem sea diam labore id erat. Vero rebum est facilisis. Dolores labore rebum ipsum at dolor mazim luptatum vel kasd elitr magna et lorem sanctus sadipscing sit. Sed est nonumy zzril laoreet consectetuer wisi ea accusam invidunt gubergren esse nonumy et sanctus. Justo tempor blandit ut accusam amet eirmod voluptua clita amet et. Diam nonumy magna suscipit kasd esse voluptua et sed invidunt nulla nulla nam eos dolore tation vero sanctus.
Sit adipiscing voluptua molestie euismod dolore diam erat sanctus nonummy labore eros feugiat justo aliquyam. Nonumy amet tincidunt ea takimata diam. Tempor in tempor amet lorem lorem voluptua ipsum liber vero mazim voluptua. Ipsum erat et est option ipsum luptatum sed. Lorem ipsum tempor.
Ipsum aliquam rebum odio dolores stet lorem nonumy amet lorem accumsan diam. Erat euismod luptatum cum vero sadipscing est in voluptua cum. Qui gubergren sadipscing amet eos esse eirmod clita sanctus magna placerat lorem. Et elitr augue velit rebum et delenit veniam ullamcorper vero consequat adipiscing dolore. At amet nisl et sadipscing justo in duo elitr hendrerit lorem dolores.