- Main Page
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

# IpePdfWriter Class Reference

Create PDF file. More...

List of all members.

## Public Member Functions

- IpePdfWriter (IpeTellStream &stream, const IpeDocument *doc, bool noShading, bool lastView, int fromPage, int toPage, int compression)
- ~IpePdfWriter ()
- void EmbedFonts (const IpeFontPool *pool)
- void CreatePages ()
- void CreateBookmarks ()
- void CreateXmlStream (IpeString xmldata, bool preCompressed)
- void CreateTrailer (IpeString creator)

## Detailed Description

Create PDF file.

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:

- 0: Must be left empty (a PDF restriction).
- 1: Ipe XML stream.
- 2: Parent of all pages objects.

## Constructor & Destructor Documentation

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.

## Member Function Documentation

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.

The documentation for this class was generated from the following files:

- ipepdfwriter.h
- ipepdfwriter.cpp