From 3b8ce4f12a75b34d890cb061a721e1a1240cddd1 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 31 Dec 2018 23:08:57 -0500 Subject: Annotation flattening including form fields Flatten annotations by integrating their appearance streams into the content stream of the containing page. In the case of form fields, only flatten if /NeedAppearance is false (or equivalently absent). If flattening form fields, also remove /AcroForm from the document catalog. --- ChangeLog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 75d4aa48..3b974fa5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2018-12-31 Jay Berkenbilt + * Add several methods for flattening form fields and annotations: + - QPDFPageDocumentHelper::flattenAnnotations - integrate + annotation appearance streams into page contents with special + handling for form fields: if appearance streams are up to date + (/NeedAppearances is false in /AcroForm), the /AcroForm key of + the document catalog is removed. Otherwise, a warning is + issued, and form fields are ignored. Non-form-field + annotations are always flattened if an appearance stream can + be found. + - QPDFAnnotationObjectHelper::getPageContentForAppearance - + generate the content stream fragment to render an appearance + stream in a page's content stream. Called by flattenAnnotations. + - QPDFAnnotationObjectHelper::getAnnotationAppearanceMatrix - + calculate the matrix that will transform from the appearance + stream coordinates to the page coordinates. Called by + getPageContentForAppearance. + * Add method QPDFObjectHandle::mergeDictionary(), which recursively merges dictionaries with semantics designed for merging resource dictionaries. See detailed description in -- cgit v1.2.3-70-g09d2