cloudformatter format requests: 1,689,537    pages delivered: 4,426,811

Style Handling

xportability LLC

Style Handling


A selected list of appearance styles are passed in css format to the XSL stylesheet which parses and interprets css. There are some special considerations in the XSL to handle differences between HTML css and XSL FO style attributes. Every attempt is made to keep the XSL FO and resulting PDF output as close as possible to the css/browser representation.

The solution also takes into account hidden items, those with "display" attribute to "none". These items are not extracted to the print file. Clicking this paragraph11 The paragraph is a large gray paragraph in the sample document. You may not see it here if it is toggled to "display:none". will toggle the display properties of the following paragraph.

I can be toggled between display in HTML and PDF and hidden in both by clicking the paragraph above me.

Note also that some other attributes you can use within the HTML that have no effect on the appearance of the page can also be used. For instance, you can use the css attribute "page-break-before" to start a new page. The paragraph following this one has:

  • font-size: 14px
  • font-style: italic
  • font-weight: bold
  • text-align: justify
  • color: rgb(125, 16, 118)
  • page-break-before: always

Lorem et diam justo diam aliquyam sanctus. Tempor qui erat et at nonumy dolore in iriure. Esse magna accusam facilisis kasd stet eu takimata minim dignissim diam accusam diam wisi rebum dolor ea nonumy. Diam no vero nulla at et iusto et invidunt facilisis sed aliquyam clita. Sed tation ipsum diam lorem eros rebum et takimata suscipit. Sadipscing dolores erat sit sadipscing eum at ipsum. Facer erat erat magna nulla stet ipsum liber consetetur magna stet laoreet ea.