wxPdfDocument  0.9.8
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
wxPdfParser Class Reference

Class representing a PDF parser. (For internal use only) More...

#include <pdfparser.h>

Public Member Functions

 wxPdfParser (const wxString &filename, const wxString &password=wxEmptyString)
 Constructor. More...
 
virtual ~wxPdfParser ()
 Destructor. More...
 
bool IsOk ()
 Check whether the PDF document to be parsed is valid. More...
 
wxString GetPdfVersion ()
 Get PDF version of parsed document. More...
 
unsigned int GetPageCount ()
 Get number of pages in the parsed document. More...
 
bool GetSourceInfo (wxPdfInfo &info)
 Get the document information dictionary. More...
 
wxPdfObjectQueueGetObjectQueue ()
 Get the queue of referenced objects. More...
 
wxPdfObjectMap * GetObjectMap ()
 Get the map of referenced objects. More...
 
void AppendObject (int originalObjectId, int actualObjectId, wxPdfObject *obj)
 Append a referenced object to the queue. More...
 
wxPdfObjectGetPageResources (unsigned int pageno)
 Get the resources of a specific page. More...
 
void GetContent (unsigned int pageno, wxArrayPtrVoid &contents)
 Get the content stream collection of a specific page. More...
 
wxPdfArrayDouble * GetPageMediaBox (unsigned int pageno)
 Get the media box of a specific page. More...
 
wxPdfArrayDouble * GetPageCropBox (unsigned int pageno)
 Get the crop box of a specific page. More...
 
wxPdfArrayDouble * GetPageBleedBox (unsigned int pageno)
 Get the bleed box of a specific page. More...
 
wxPdfArrayDouble * GetPageTrimBox (unsigned int pageno)
 Get the trim box of a specific page. More...
 
wxPdfArrayDouble * GetPageArtBox (unsigned int pageno)
 Get the art box of a specific page. More...
 
int GetPageRotation (unsigned int pageno)
 Get the rotation of a specific page. More...
 
wxPdfObjectResolveObject (wxPdfObject *obj)
 Resolve an object. More...
 
void SetUseRawStream (bool useRawStream)
 Set flag whether a stream should be decoded or not. More...
 
bool GetUseRawStream ()
 Get flag whether a stream should be decoded or not. More...
 

Protected Member Functions

wxPdfObjectGetPageResources (wxPdfObject *page)
 Get the resources of a specific page identified by a page object. More...
 
void GetPageContent (wxPdfObject *contentRef, wxArrayPtrVoid &contents)
 Get the content stream collection of a specific page. More...
 
wxPdfArrayDouble * GetPageBox (wxPdfDictionary *page, const wxString &boxIndex)
 Get a page box. More...
 
int GetPageRotation (wxPdfDictionary *page)
 Get a page rotation. More...
 
bool ParseDocument ()
 Parse PDF document. More...
 
bool SetupDecryptor ()
 Setup a decryptor. More...
 
bool ParseXRef ()
 Parse the cross reference. More...
 
bool ParsePageTree (wxPdfDictionary *pages)
 Parse the page tree of the PDF document. More...
 
wxPdfDictionaryParseXRefSection ()
 Parse a cross reference section. More...
 
bool ParseXRefStream (int ptr, bool setTrailer)
 Parse a cross reference stream. More...
 
wxPdfObjectParseObject ()
 Parse an object. More...
 
wxPdfDictionaryParseDictionary ()
 Parse a dictionary. More...
 
wxPdfArrayParseArray ()
 Parse an array. More...
 
wxPdfObjectParseSpecificObject (int idx)
 Parse a specific object. More...
 
wxPdfObjectParseDirectObject (int k)
 Parse a direct object. More...
 
wxPdfObjectParseObjectStream (wxPdfStream *stream, int idx)
 Parse an object from an object stream. More...
 
void GetStreamBytes (wxPdfStream *stream)
 Parse the content of a stream object. More...
 
void GetStreamBytesRaw (wxPdfStream *stream)
 Parse the raw content of a stream object. More...
 
wxMemoryOutputStream * DecodePredictor (wxMemoryOutputStream *in, wxPdfObject *dicPar)
 Decode a stream predictor. More...
 
wxMemoryOutputStream * FlateDecode (wxMemoryOutputStream *osIn)
 Decode a stream that has the FlateDecode filter. More...
 
wxMemoryOutputStream * ASCIIHexDecode (wxMemoryOutputStream *osIn)
 Decode a stream that has the ASCIIHexDecode filter. More...
 
wxMemoryOutputStream * ASCII85Decode (wxMemoryOutputStream *osIn)
 Decode a stream that has the ASCII85Decode filter. More...
 
wxMemoryOutputStream * LZWDecode (wxMemoryOutputStream *osIn)
 Decode a stream that has the ASCII85Decode filter. More...
 

Static Protected Member Functions

static wxFileSystem * GetFileSystem ()
 Get wxWidgets file system. More...
 

Detailed Description

Class representing a PDF parser. (For internal use only)

Constructor & Destructor Documentation

◆ wxPdfParser()

wxPdfParser::wxPdfParser ( const wxString &  filename,
const wxString &  password = wxEmptyString 
)

Constructor.

◆ ~wxPdfParser()

virtual wxPdfParser::~wxPdfParser ( )
virtual

Destructor.

Member Function Documentation

◆ AppendObject()

void wxPdfParser::AppendObject ( int  originalObjectId,
int  actualObjectId,
wxPdfObject obj 
)

Append a referenced object to the queue.

◆ ASCII85Decode()

wxMemoryOutputStream* wxPdfParser::ASCII85Decode ( wxMemoryOutputStream *  osIn)
protected

Decode a stream that has the ASCII85Decode filter.

Parameters
osInthe input data
Returns
the decoded data

◆ ASCIIHexDecode()

wxMemoryOutputStream* wxPdfParser::ASCIIHexDecode ( wxMemoryOutputStream *  osIn)
protected

Decode a stream that has the ASCIIHexDecode filter.

Parameters
osInthe input data
Returns
the decoded data

◆ DecodePredictor()

wxMemoryOutputStream* wxPdfParser::DecodePredictor ( wxMemoryOutputStream *  in,
wxPdfObject dicPar 
)
protected

Decode a stream predictor.

◆ FlateDecode()

wxMemoryOutputStream* wxPdfParser::FlateDecode ( wxMemoryOutputStream *  osIn)
protected

Decode a stream that has the FlateDecode filter.

Parameters
osInthe input data
Returns
the decoded data

◆ GetContent()

void wxPdfParser::GetContent ( unsigned int  pageno,
wxArrayPtrVoid &  contents 
)

Get the content stream collection of a specific page.

◆ GetFileSystem()

static wxFileSystem* wxPdfParser::GetFileSystem ( )
staticprotected

Get wxWidgets file system.

◆ GetObjectMap()

wxPdfObjectMap* wxPdfParser::GetObjectMap ( )
inline

Get the map of referenced objects.

◆ GetObjectQueue()

wxPdfObjectQueue* wxPdfParser::GetObjectQueue ( )
inline

Get the queue of referenced objects.

◆ GetPageArtBox()

wxPdfArrayDouble* wxPdfParser::GetPageArtBox ( unsigned int  pageno)

Get the art box of a specific page.

◆ GetPageBleedBox()

wxPdfArrayDouble* wxPdfParser::GetPageBleedBox ( unsigned int  pageno)

Get the bleed box of a specific page.

◆ GetPageBox()

wxPdfArrayDouble* wxPdfParser::GetPageBox ( wxPdfDictionary page,
const wxString &  boxIndex 
)
protected

Get a page box.

◆ GetPageContent()

void wxPdfParser::GetPageContent ( wxPdfObject contentRef,
wxArrayPtrVoid &  contents 
)
protected

Get the content stream collection of a specific page.

◆ GetPageCount()

unsigned int wxPdfParser::GetPageCount ( )

Get number of pages in the parsed document.

◆ GetPageCropBox()

wxPdfArrayDouble* wxPdfParser::GetPageCropBox ( unsigned int  pageno)

Get the crop box of a specific page.

◆ GetPageMediaBox()

wxPdfArrayDouble* wxPdfParser::GetPageMediaBox ( unsigned int  pageno)

Get the media box of a specific page.

◆ GetPageResources() [1/2]

wxPdfObject* wxPdfParser::GetPageResources ( unsigned int  pageno)

Get the resources of a specific page.

◆ GetPageResources() [2/2]

wxPdfObject* wxPdfParser::GetPageResources ( wxPdfObject page)
protected

Get the resources of a specific page identified by a page object.

◆ GetPageRotation() [1/2]

int wxPdfParser::GetPageRotation ( unsigned int  pageno)

Get the rotation of a specific page.

◆ GetPageRotation() [2/2]

int wxPdfParser::GetPageRotation ( wxPdfDictionary page)
protected

Get a page rotation.

◆ GetPageTrimBox()

wxPdfArrayDouble* wxPdfParser::GetPageTrimBox ( unsigned int  pageno)

Get the trim box of a specific page.

◆ GetPdfVersion()

wxString wxPdfParser::GetPdfVersion ( )
inline

Get PDF version of parsed document.

◆ GetSourceInfo()

bool wxPdfParser::GetSourceInfo ( wxPdfInfo info)

Get the document information dictionary.

◆ GetStreamBytes()

void wxPdfParser::GetStreamBytes ( wxPdfStream stream)
protected

Parse the content of a stream object.

◆ GetStreamBytesRaw()

void wxPdfParser::GetStreamBytesRaw ( wxPdfStream stream)
protected

Parse the raw content of a stream object.

◆ GetUseRawStream()

bool wxPdfParser::GetUseRawStream ( )
inline

Get flag whether a stream should be decoded or not.

◆ IsOk()

bool wxPdfParser::IsOk ( )

Check whether the PDF document to be parsed is valid.

◆ LZWDecode()

wxMemoryOutputStream* wxPdfParser::LZWDecode ( wxMemoryOutputStream *  osIn)
protected

Decode a stream that has the ASCII85Decode filter.

Parameters
osInthe input data
Returns
the decoded data

◆ ParseArray()

wxPdfArray* wxPdfParser::ParseArray ( )
protected

Parse an array.

◆ ParseDictionary()

wxPdfDictionary* wxPdfParser::ParseDictionary ( )
protected

Parse a dictionary.

◆ ParseDirectObject()

wxPdfObject* wxPdfParser::ParseDirectObject ( int  k)
protected

Parse a direct object.

◆ ParseDocument()

bool wxPdfParser::ParseDocument ( )
protected

Parse PDF document.

◆ ParseObject()

wxPdfObject* wxPdfParser::ParseObject ( )
protected

Parse an object.

◆ ParseObjectStream()

wxPdfObject* wxPdfParser::ParseObjectStream ( wxPdfStream stream,
int  idx 
)
protected

Parse an object from an object stream.

◆ ParsePageTree()

bool wxPdfParser::ParsePageTree ( wxPdfDictionary pages)
protected

Parse the page tree of the PDF document.

◆ ParseSpecificObject()

wxPdfObject* wxPdfParser::ParseSpecificObject ( int  idx)
protected

Parse a specific object.

◆ ParseXRef()

bool wxPdfParser::ParseXRef ( )
protected

Parse the cross reference.

◆ ParseXRefSection()

wxPdfDictionary* wxPdfParser::ParseXRefSection ( )
protected

Parse a cross reference section.

◆ ParseXRefStream()

bool wxPdfParser::ParseXRefStream ( int  ptr,
bool  setTrailer 
)
protected

Parse a cross reference stream.

◆ ResolveObject()

wxPdfObject* wxPdfParser::ResolveObject ( wxPdfObject obj)

Resolve an object.

◆ SetupDecryptor()

bool wxPdfParser::SetupDecryptor ( )
protected

Setup a decryptor.

◆ SetUseRawStream()

void wxPdfParser::SetUseRawStream ( bool  useRawStream)
inline

Set flag whether a stream should be decoded or not.


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