Issue #40: Sanitize document

This commit is contained in:
Jakub Melka
2023-02-19 18:36:46 +01:00
parent 4a603c80c0
commit 361ee247e5
19 changed files with 1089 additions and 243 deletions

View File

@ -669,6 +669,13 @@ PDFDocumentBuilder::PDFDocumentBuilder(const PDFDocument* document) :
}
PDFDocumentBuilder::PDFDocumentBuilder(const PDFObjectStorage& storage, PDFVersion version) :
m_storage(storage),
m_version(version)
{
}
void PDFDocumentBuilder::reset()
{
*this = PDFDocumentBuilder();
@ -5414,6 +5421,20 @@ void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
}
void PDFDocumentBuilder::removePageThumbnail(PDFObjectReference pageReference)
{
PDFObjectFactory objectBuilder;
objectBuilder.beginDictionary();
objectBuilder.beginDictionaryItem("Thumb");
objectBuilder << PDFObject();
objectBuilder.endDictionaryItem();
objectBuilder.endDictionary();
PDFObject updatedPageObject = objectBuilder.takeObject();
mergeTo(pageReference, updatedPageObject);
}
/* END GENERATED CODE */
} // namespace pdf