PoDoFo 0.7.0
|
#include <PdfStreamedDocument.h>
Public Member Functions | |
PdfStreamedDocument (PdfOutputDevice *pDevice, EPdfVersion eVersion=ePdfVersion_Default, PdfEncrypt *pEncrypt=NULL, EPdfWriteMode eWriteMode=ePdfWriteMode_Default) | |
PdfStreamedDocument (const char *pszFilename, EPdfVersion eVersion=ePdfVersion_Default, PdfEncrypt *pEncrypt=NULL, EPdfWriteMode eWriteMode=ePdfWriteMode_Default) | |
void | Close () |
virtual EPdfWriteMode | GetWriteMode () const |
virtual EPdfVersion | GetPdfVersion () const |
virtual bool | IsLinearized () const |
virtual bool | IsPrintAllowed () const |
virtual bool | IsEditAllowed () const |
virtual bool | IsCopyAllowed () const |
virtual bool | IsEditNotesAllowed () const |
virtual bool | IsFillAndSignAllowed () const |
virtual bool | IsAccessibilityAllowed () const |
virtual bool | IsDocAssemblyAllowed () const |
virtual bool | IsHighPrintAllowed () const |
PdfStreamedDocument is the preferred class for creating new PDF documents.
Page contents, fonts and images are written to disk as soon as possible and are not kept in memory. This results in faster document generation and less memory being used.
Please use PdfMemDocument if you intend to work on the object structure of a PDF file.
One of the design goals of PdfStreamedDocument was to hide the underlying object structure of a PDF file as far as possible.
Example of using PdfStreamedDocument:
PdfStreamedDocument document( "outputfile.pdf" ); PdfPage* pPage = document.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_A4 ) ); PdfFont* pFont = document.CreateFont( "Arial" );
PdfPainter painter; painter.SetPage( pPage ); painter.SetFont( pFont ); painter.DrawText( 56.69, pPage->GetPageSize().GetHeight() - 56.69, "Hello World!" ); painter.FinishPage();
document.Close();
PoDoFo::PdfStreamedDocument::PdfStreamedDocument | ( | PdfOutputDevice * | pDevice, |
EPdfVersion | eVersion = ePdfVersion_Default , |
||
PdfEncrypt * | pEncrypt = NULL , |
||
EPdfWriteMode | eWriteMode = ePdfWriteMode_Default |
||
) |
Create a new PdfStreamedDocument. All data is written to an output device immediately.
pDevice | an output device |
eVersion | the PDF version of the document to write. The PDF version can only be set in the constructor as it is the first item written to the document on disk. |
pEncrypt | pointer to an encryption object or NULL. If not NULL the PdfEncrypt object will be copied and used to encrypt the created document. |
eWriteMode | additional options for writing the pdf |
PoDoFo::PdfStreamedDocument::PdfStreamedDocument | ( | const char * | pszFilename, |
EPdfVersion | eVersion = ePdfVersion_Default , |
||
PdfEncrypt * | pEncrypt = NULL , |
||
EPdfWriteMode | eWriteMode = ePdfWriteMode_Default |
||
) |
Create a new PdfStreamedDocument. All data is written to a file immediately.
pszFilename | resulting PDF file |
eVersion | the PDF version of the document to write. The PDF version can only be set in the constructor as it is the first item written to the document on disk. |
pEncrypt | pointer to an encryption object or NULL. If not NULL the PdfEncrypt object will be copied and used to encrypt the created document. |
eWriteMode | additional options for writing the pdf |
void PoDoFo::PdfStreamedDocument::Close | ( | ) |
Close the document. The PDF file on disk is finished. No other member function of this class maybe called after calling this function.
EPdfVersion PoDoFo::PdfStreamedDocument::GetPdfVersion | ( | ) | const [inline, virtual] |
Get the PDF version of the document
Implements PoDoFo::PdfDocument.
EPdfWriteMode PoDoFo::PdfStreamedDocument::GetWriteMode | ( | ) | const [inline, virtual] |
bool PoDoFo::PdfStreamedDocument::IsAccessibilityAllowed | ( | ) | const [inline, virtual] |
Checks if it is allowed to extract text and graphics to support users with disabillities Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsCopyAllowed | ( | ) | const [inline, virtual] |
Checks if text and graphics extraction is allowed. Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsDocAssemblyAllowed | ( | ) | const [inline, virtual] |
Checks if it is allowed to insert, create, rotate, delete pages or add bookmarks Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsEditAllowed | ( | ) | const [inline, virtual] |
Checks if modifiying this document (besides annotations, form fields or changing pages) is allowed. Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsEditNotesAllowed | ( | ) | const [inline, virtual] |
Checks if it is allowed to add or modify annotations or form fields Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsFillAndSignAllowed | ( | ) | const [inline, virtual] |
Checks if it is allowed to fill in existing form or signature fields Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsHighPrintAllowed | ( | ) | const [inline, virtual] |
Checks if it is allowed to print a high quality version of this document Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsLinearized | ( | ) | const [inline, virtual] |
Returns wether this PDF document is linearized, aka weboptimized
Implements PoDoFo::PdfDocument.
bool PoDoFo::PdfStreamedDocument::IsPrintAllowed | ( | ) | const [inline, virtual] |
Checks if printing this document is allowed. Every PDF consuming applications has to adhere this value!
Implements PoDoFo::PdfDocument.