Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfMemDocument::Load ( const char *  pszFilename )

Load a PdfMemDocument from a file

pszFilenamefilename of the file which is going to be parsed/opened

This might throw a PdfError( ePdfError_InvalidPassword ) exception if a password is required to read this PDF. Call SetPassword with the correct password in this case.

See also:

Definition at line 154 of file PdfMemDocument.cpp.

References Clear(), PoDoFo::PdfDocument::GetObjects(), InitFromParser(), PoDoFo::PdfDocument::InitPagesTree(), m_pParser, and PoDoFo::PdfParser::ParseFile().

Referenced by PdfMemDocument().


    // Call parse file instead of using the constructor
    // so that m_pParser is initialized for encrypted documents
    m_pParser = new PdfParser( PdfDocument::GetObjects() );
    m_pParser->ParseFile( pszFilename, true );
    InitFromParser( m_pParser );

    // Delete the temporary pdfparser object.
    // It is only set to m_pParser so that SetPassword can work
    delete m_pParser;
    m_pParser = NULL;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index