This class is responsible for the creation of a PDF file from the Ipe data. You have to create an IpePdfWriter first, providing a file that has been opened for (binary) writing and is empty. Then call EmbedFonts() to embed the IpeFontPool and CreatePages() to embed the pages. CreateXmlStream
embeds a stream with the XML representation of the Ipe document. Finally, call CreateTrailer
to complete the PDF document, and close the file.
Some reserved PDF object numbers:
IpePdfWriter::IpePdfWriter | ( | IpeTellStream & | stream, | |
const IpeDocument * | doc, | |||
bool | noShading, | |||
bool | lastView, | |||
int | fromPage, | |||
int | toPage, | |||
int | compression | |||
) |
Create PDF writer operating on this (open and empty) file.
If noShading is true
, no background shading will be applied to pages (if such a shading is defined in the document's style sheet.
IpePdfWriter::~IpePdfWriter | ( | ) |
Destructor.
void IpePdfWriter::EmbedFonts | ( | const IpeFontPool * | pool | ) |
Write all fonts to the PDF file, and fill in their object numbers. Embeds no fonts if pool
is 0, but must be called nevertheless.
void IpePdfWriter::CreatePages | ( | ) |
Create all PDF pages.
void IpePdfWriter::CreateBookmarks | ( | ) |
Create the bookmarks (PDF outline).
void IpePdfWriter::CreateXmlStream | ( | IpeString | xmldata, | |
bool | preCompressed | |||
) |
Create a stream containing the XML data.
void IpePdfWriter::CreateTrailer | ( | IpeString | creator | ) |
Create the root objects and trailer of the PDF file.