mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Update file specification according the PDF 2.0 compliance
This commit is contained in:
@ -125,6 +125,7 @@ PDFFileSpecification PDFFileSpecification::parse(const PDFObjectStorage* storage
|
||||
result.m_DOS = loader.readStringFromDictionary(dictionary, "DOS");
|
||||
result.m_Mac = loader.readStringFromDictionary(dictionary, "Mac");
|
||||
result.m_Unix = loader.readStringFromDictionary(dictionary, "Unix");
|
||||
result.m_id = PDFFileIdentifier::parse(storage, dictionary->get("ID"));
|
||||
result.m_volatile = loader.readBooleanFromDictionary(dictionary, "V", false);
|
||||
result.m_description = loader.readTextStringFromDictionary(dictionary, "Desc", QString());
|
||||
result.m_collection = collectionObject.isReference() ? collectionObject.getReference() : PDFObjectReference();
|
||||
@ -180,4 +181,23 @@ PDFEmbeddedFile PDFEmbeddedFile::parse(const PDFObjectStorage* storage, PDFObjec
|
||||
return result;
|
||||
}
|
||||
|
||||
PDFFileIdentifier PDFFileIdentifier::parse(const PDFObjectStorage* storage, PDFObject object)
|
||||
{
|
||||
PDFFileIdentifier result;
|
||||
PDFDocumentDataLoaderDecorator loader(storage);
|
||||
std::vector<QByteArray> identifiers = loader.readStringArray(object);
|
||||
|
||||
if (identifiers.size() >= 1)
|
||||
{
|
||||
result.m_permanentIdentifier = qMove(identifiers[0]);
|
||||
}
|
||||
|
||||
if (identifiers.size() >= 2)
|
||||
{
|
||||
result.m_changingIdentifier = qMove(identifiers[1]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace pdf
|
||||
|
Reference in New Issue
Block a user