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

const PdfString & PoDoFo::PdfParser::GetDocumentId (  ) [private]

Small helper method to retrieve the document id from the trailer

Returns:
the document id of this PDF document

Definition at line 1164 of file PdfParser.cpp.

References PoDoFo::ePdfError_InvalidEncryptionDict, PoDoFo::PdfVariant::GetArray(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfDictionary::GetKey(), PoDoFo::PdfDictionary::HasKey(), and PODOFO_RAISE_ERROR_INFO.

Referenced by ReadObjects(), and SetPassword().

{
    if( !m_pTrailer->GetDictionary().HasKey( PdfName("ID") ) )
    {
        PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidEncryptionDict, "No document ID found in trailer.");
    }

    return m_pTrailer->GetDictionary().GetKey( PdfName("ID") )->GetArray()[0].GetString();
}

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