Forum How do I...?

HtML character/image encoding problem

qosler
How do I get the HTML encoding ▶ (right pointing triangle solid black) to convert properly in Prince XL?
mikeday
You just need a font that contains a glyph for this character. Which operating system are you running Prince on? Is it showing up as a question mark?
qosler
Prince is running from a Linux Box. Red Hat AS not sure which version.
mikeday
The OpenSymbol font should support this character, can you check whether it is installed? It is provided by the libreoffice-opensymbol-fonts package.
qosler
For each new patient How do I force a page eject from the htm to the pdf conversion?
mikeday
You can start a new page by wrapping the content in a block element and using one of the page break properties, eg. like this:
<div style="page-break-before: always">
...
</div>
qosler
How do I print the ID number for each record at the bottom of each page generated by The Prince conversion to PDF? The printing of a record may take 2-4 pages. So the Id number changes with each record. The app uses PHP to get the records and CSS/Html for Screen display. Html to Pdf is provided by Prince.
hallvord
Hi qosler,
have a look at the Prince documentation for headers and footers:
http://www.princexml.com/doc/9.0/page-headers-footers/
Assuming that there is some markup defining a "record", the string-set method in the documentation is one way to do it. You need this code to define the footer:

@page{
    @bottom-left{
        content: string(this-section);
    }
}


and you need a separate block of code using string-set to define the content of this-section. Exactly how to do this depends on your markup, here are some examples:

If you have headers (for example H2) describing your records and want the content of the previous H2 tag in the footer of each page, you could do this:

h2 { string-set: this-section content() }


If you have attributes describing the records, for example if each record is enclosed in:

<section id="record2">


you could use this code:

section { string-set: this-section attr(id) }


I hope this helps!

Announcement: repos for tests/utils