Hi,
In PdfParser.cpp in function PdfParser::ReadObjectsInternal():
pObject->ParseFile( m_pEncrypt );
*if* (m_pEncrypt && pObject->IsDictionary()) {
PdfObject* pObjType = pObject->GetDictionary().GetKey( PdfName::KeyType );
*if*( pObjType && pObjType->IsName() && pObjType->GetName() == "XRef" ) {
// XRef is never encrypted
*delete* pObject;
pObject = *new* PdfParserObject( m_vecObjects, m_device, m_buffer, m_offsets
[i].lOffset );
pObject->SetLoadOnDemand( m_bLoadOnDemand );
pObject->ParseFile( *NULL* );
}
}
This code is executed for each object in cross reference table. If
encryption is enabled so m_pEncrypt is non-null then is called
pObject->IsDictionary() which triggers immediate parsing of each object. In
pdf without encryption is each object parsed only on first access (maybe
with few exceptions).
I think there are better options how to distinguish whether is current
object xref. For example by comparing object number with set of object
numbers of xref objects.
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users