Ipelib
Classes | Public Member Functions | List of all members
ipe::PdfWriter Class Reference

#include <ipepdfwriter.h>

Public Member Functions

 PdfWriter (TellStream &stream, const Document *doc, const PdfResources *resources, uint32_t flags, int fromPage, int toPage, int compression, Attribute variant)
 
 ~PdfWriter ()
 
void createPages ()
 
void createPageView (int page, int view)
 
void createBookmarks ()
 
void createNamedDests ()
 
void createXmlStream (String xmldata, bool preCompressed)
 
void createTrailer ()
 

Detailed Description

Create PDF file.

This class is responsible for the creation of a PDF file from the Ipe data. You have to create a PdfWriter first, providing a file that has been opened for (binary) writing and is empty. Then call createPages() to embed the pages. Optionally, call createXmlStream to embed a stream with the XML representation of the 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:  XML stream.
  - 2: Parent of all pages objects.
  - 3: ExtGState resource from pdflatex
  - 4: Shading resource from pdflatex
  - 5: Pattern resource from pdflatex
  - 6: ColorSpace resource from pdflatex

Constructor & Destructor Documentation

◆ PdfWriter()

PdfWriter::PdfWriter ( TellStream &  stream,
const Document *  doc,
const PdfResources *  resources,
uint32_t  flags,
int  fromPage,
int  toPage,
int  compression,
Attribute  variant 
)

◆ ~PdfWriter()

PdfWriter::~PdfWriter ( )

Destructor.

Member Function Documentation

◆ createPages()

void PdfWriter::createPages ( )

◆ createPageView()

void PdfWriter::createPageView ( int  page,
int  view 
)

◆ createBookmarks()

void PdfWriter::createBookmarks ( )

◆ createNamedDests()

void PdfWriter::createNamedDests ( )

◆ createXmlStream()

void PdfWriter::createXmlStream ( String  xmldata,
bool  preCompressed 
)

Create a stream containing the XML data.

References ipe::String::data(), and ipe::String::size().

Referenced by ipe::Document::save().

◆ createTrailer()

void PdfWriter::createTrailer ( )

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