#include <PdfWriter.h>
Public Member Functions | |
PdfWriter (PdfParser *pParser) | |
PdfWriter (PdfVecObjects *pVecObjects, const PdfObject *pTrailer) | |
void | Write (const char *pszFilename) |
void | Write (PdfOutputDevice *pDevice) |
void | SetWriteMode (EPdfWriteMode eWriteMode) |
EPdfWriteMode | GetWriteMode () const |
void | SetPdfVersion (EPdfVersion eVersion) |
EPdfVersion | GetPdfVersion () const |
void | SetLinearized (bool bLinearize) |
bool | GetLinearized () const |
void | SetUseXRefStream (bool bStream) |
bool | GetUseXRefStream () const |
const char * | GetPdfVersionString () const |
void | SetEncrypted (const PdfEncrypt &rEncrypt) |
bool | GetEncrypted () const |
void | GetByteOffset (PdfObject *pObject, pdf_long *pulOffset) |
void | WriteToBuffer (char **ppBuffer, pdf_long *pulLen) |
void | FillTrailerObject (PdfObject *pTrailer, pdf_long lSize, bool bPrevEntry, bool bOnlySizeKey) const |
Protected Member Functions | |
PdfWriter (PdfVecObjects *pVecObjects) | |
void PODOFO_LOCAL | WritePdfHeader (PdfOutputDevice *pDevice) |
void | WritePdfObjects (PdfOutputDevice *pDevice, const PdfVecObjects &vecObjects, PdfXRef *pXref) PODOFO_LOCAL |
void | CreateFileIdentifier (PdfString &identifier, const PdfObject *pTrailer) const PODOFO_LOCAL |
Protected Attributes | |
PdfVecObjects * | m_vecObjects |
PdfEncrypt * | m_pEncrypt |
If not NULL encrypt all strings and streams and create an encryption dictionary in the trailer. | |
PdfObject * | m_pEncryptObj |
Used to temporarly store the encryption dictionary. |
It does not know about pages but only about PdfObjects.
Most users will want to use PdfDocument.
|
Create a PdfWriter object from a PdfParser object
|
|
Create a new pdf file, from an vector of PdfObjects and a trailer object.
|
|
Create a PdfWriter from a PdfVecObjects |
|
Creates a file identifier which is required in several PDF workflows. All values from the files document information dictionary are used to create a unique MD5 key which is added to the trailer dictionary.
|
|
Add required keys to a trailer object
|
|
Calculate the byte offset of the object pObject in the PDF file if the file was written to disk at the moment of calling this function. This function is very calculation intensive!
|
|
|
|
|
|
Get the PDF version of the document
|
|
Get the file format version of the pdf
|
|
|
|
Get the write mode used for wirting the PDF
|
|
Set the written document to be encrypted using a PdfEncrypt object
|
|
Enabled linearization for this document. I.e. optimize it for web usage. Default is false.
|
|
Set the PDF Version of the document. Has to be called before Write() to have an effect.
|
|
Create a XRef stream which is in some case more compact but requires at least PDF 1.5 Default is false.
|
|
Set the write mode to use when writing the PDF.
|
|
Writes the complete document to a PdfOutputDevice
|
|
Writes the complete document to a PDF file.
|
|
Writes the pdf header to the current file.
|
|
Write pdf objects to file
|
|
Write the whole document to a buffer in memory. Better use a PdfOutputDevice that writes to a PdfRefCountedBuffer.
|
|
Fill all keys in the linearization dictionary with their values
|