From fa2516df712aa59eb414933a912d30bb6fa1606e Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 26 Feb 2021 14:47:52 -0500 Subject: Fix behavior for finding /Q, /DA, and /DR for form fields If not found in the field hierarchy, /Q and /DA are supposed to be looked up in the document-level form dictionary. /DR is supposed to only come from the document dictionary. --- libqpdf/QPDFPageDocumentHelper.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libqpdf/QPDFPageDocumentHelper.cc') diff --git a/libqpdf/QPDFPageDocumentHelper.cc b/libqpdf/QPDFPageDocumentHelper.cc index 048319f5..74b21e82 100644 --- a/libqpdf/QPDFPageDocumentHelper.cc +++ b/libqpdf/QPDFPageDocumentHelper.cc @@ -148,8 +148,7 @@ QPDFPageDocumentHelper::flattenAnnotationsForPage( "/Resources", as_resources.shallowCopy()); as_resources = as.getDict().getKey("/Resources"); } - as_resources.mergeResources( - ff.getInheritableFieldValue("/DR")); + as_resources.mergeResources(ff.getDefaultResources()); } else { -- cgit v1.2.3-54-g00ecf