mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Implementation of rev. 6 hash
This commit is contained in:
@ -272,11 +272,21 @@ PDFDocument PDFDocumentReader::readFromBuffer(const QByteArray& buffer)
|
||||
// SECURITY - handle encrypted documents
|
||||
// ------------------------------------------------------------------------------------------
|
||||
const PDFObject& trailerDictionaryObject = xrefTable.getTrailerDictionary();
|
||||
if (!trailerDictionaryObject.isDictionary())
|
||||
|
||||
const PDFDictionary* trailerDictionary = nullptr;
|
||||
if (trailerDictionaryObject.isDictionary())
|
||||
{
|
||||
trailerDictionary = trailerDictionaryObject.getDictionary();
|
||||
}
|
||||
else if (trailerDictionaryObject.isStream())
|
||||
{
|
||||
const PDFStream* stream = trailerDictionaryObject.getStream();
|
||||
trailerDictionary = stream->getDictionary();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw PDFParserException(tr("Invalid trailer dictionary."));
|
||||
}
|
||||
const PDFDictionary* trailerDictionary = trailerDictionaryObject.getDictionary();
|
||||
|
||||
// Read the document ID
|
||||
QByteArray id;
|
||||
|
Reference in New Issue
Block a user