PoDoFo::PdfStreamedDocument Class Reference

#include <PdfStreamedDocument.h>

Inheritance diagram for PoDoFo::PdfStreamedDocument:
PoDoFo::PdfDocument

List of all members.

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

Detailed Description

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.

See also:
PdfDocument
PdfMemDocument

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();


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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

Member Function Documentation

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

Returns:
EPdfVersion version of the pdf document

Implements PoDoFo::PdfDocument.

EPdfWriteMode PoDoFo::PdfStreamedDocument::GetWriteMode (  )  const [inline, virtual]

Get the write mode used for wirting the PDF

Returns:
the write mode

Implements PoDoFo::PdfDocument.

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!

Returns:
true if you are allowed to extract text and graphics to support users with disabillities
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to extract text and graphics from this document
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to insert, create, rotate, delete pages or add bookmarks
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to modfiy this document
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to add or modify annotations or form fields
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to fill in existing form or signature fields
See also:
PdfEncrypt to set own document permissions.

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!

Returns:
true if you are allowed to print a high quality version of this document
See also:
PdfEncrypt to set own document permissions.

Implements PoDoFo::PdfDocument.

bool PoDoFo::PdfStreamedDocument::IsLinearized (  )  const [inline, virtual]

Returns wether this PDF document is linearized, aka weboptimized

Returns:
true if the PDF document is linearized

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!

Returns:
true if you are allowed to print this document
See also:
PdfEncrypt to set own document permissions.

Implements PoDoFo::PdfDocument.


Generated on 12 Feb 2012 for PoDoFo by  doxygen 1.6.1