Ipelib
|
#include <ipepdfwriter.h>
Public Member Functions | |
PdfWriter (TellStream &stream, const Document *doc, const PdfResources *resources, bool markedView, int fromPage, int toPage, int compression) | |
~PdfWriter () | |
void | createPages () |
void | createPageView (int page, int view) |
void | createBookmarks () |
void | createXmlStream (String xmldata, bool preCompressed) |
void | createTrailer () |
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:
PdfWriter::PdfWriter | ( | TellStream & | stream, |
const Document * | doc, | ||
const PdfResources * | resources, | ||
bool | markedView, | ||
int | fromPage, | ||
int | toPage, | ||
int | compression | ||
) |
Create a PDF writer operating on this (open and empty) file.
Referenced by ipe::PdfPainter::doDrawSymbol().
PdfWriter::~PdfWriter | ( | ) |
Destructor.
References ipe::Attribute::BACKGROUND(), ipe::Bitmap::bitsPerComponent(), ipe::Bitmap::colorKey(), ipe::Bitmap::colorSpace(), ipe::Page::count(), ipe::PdfDict::count(), ipe::Bitmap::data(), ipe::Buffer::data(), ipe::DeflateStream::deflate(), ipe::PdfDict::deflated(), ipe::PdfObj::dict(), ipe::Text::draw(), ipe::Object::draw(), ipe::Bitmap::EDCTDecode, ipe::Bitmap::EDeviceCMYK, ipe::Bitmap::EDeviceGray, ipe::Bitmap::EDeviceRGB, ipe::Bitmap::EFlateDecode, ipe::Bitmap::filter(), ipe::Page::findLayer(), ipe::PdfDict::get(), ipe::PdfDict::getNumberArray(), ipe::Bitmap::height(), ipe::BitmapFinder::iBitmaps, ipe::TextPadding::iBottom, ipe::TextPadding::iLeft, ipe::PdfDict::inflate(), ipe::TextPadding::iRight, ipe::PdfPainter::iStream, ipe::TextPadding::iTop, ipe::PdfDict::key(), ipe::String::left(), ipe::Page::object(), ipe::Page::objectVisible(), ipe::Stream::putChar(), ipe::Stream::putRaw(), ipe::PdfObj::ref(), ipe::Bitmap::setObjNum(), ipe::Bitmap::size(), ipe::Buffer::size(), ipe::PdfDict::stream(), ipe::Page::titleText(), ipe::PdfRef::value(), ipe::PdfDict::value(), ipe::Bitmap::width(), and ipe::PdfObj::write().
void PdfWriter::createPages | ( | ) |
Create all PDF pages.
Referenced by ipe::Document::exportPages(), and ipe::Document::save().
void PdfWriter::createPageView | ( | int | page, |
int | view | ||
) |
create contents and page stream for this page view.
References ipe::Object::accept(), ipe::Object::asGroup(), ipe::Attribute::BACKGROUND(), ipe::Page::bbox(), ipe::DeflateStream::close(), ipe::Page::count(), ipe::String::data(), ipe::Page::effect(), ipe::String::empty(), ipe::Page::findLayer(), ipe::Layout::iCrop, ipe::Symbol::iObject, ipe::Rect::isEmpty(), ipe::Attribute::isNormal(), ipe::PdfPainter::iStream, ipe::Page::object(), ipe::Page::objectVisible(), ipe::Page::pageBBox(), ipe::Effect::pageDictionary(), ipe::Layout::paper(), ipe::BitmapFinder::scanPage(), ipe::String::size(), ipe::Group::url(), ipe::Page::viewBBox(), and ipe::Page::visible().
Referenced by ipe::Document::exportView().
void PdfWriter::createBookmarks | ( | ) |
Create the bookmarks (PDF outline).
References ipe::String::empty(), and ipe::PdfPainter::iStream.
Referenced by ipe::Document::save().
void PdfWriter::createXmlStream | ( | String | xmldata, |
bool | preCompressed | ||
) |
Create a stream containing the XML data.
References ipe::String::data(), ipe::PdfPainter::iStream, ipe::String::size(), and ipe::String::unicode().
Referenced by ipe::Document::save().
void PdfWriter::createTrailer | ( | ) |
Create the root objects and trailer of the PDF file.
References ipe::String::empty(), ipe::String::find(), ipe::Document::SProperties::iAuthor, ipe::Document::SProperties::iCreated, ipe::Document::SProperties::iCreator, ipe::Document::SProperties::iFullScreen, ipe::Document::SProperties::iKeywords, ipe::Document::SProperties::iModified, ipe::PdfPainter::iStream, ipe::Document::SProperties::iSubject, and ipe::Document::SProperties::iTitle.
Referenced by ipe::Document::exportPages(), ipe::Document::exportView(), and ipe::Document::save().