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. --- libqpdf/QPDFAnnotationObjectHelper.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libqpdf/QPDFAnnotationObjectHelper.cc') diff --git a/libqpdf/QPDFAnnotationObjectHelper.cc b/libqpdf/QPDFAnnotationObjectHelper.cc index a5b824f3..4c305149 100644 --- a/libqpdf/QPDFAnnotationObjectHelper.cc +++ b/libqpdf/QPDFAnnotationObjectHelper.cc @@ -149,12 +149,12 @@ QPDFAnnotationObjectHelper::getAnnotationAppearanceMatrix(int rotate) QPDFMatrix matrix; if (matrix_obj.isMatrix()) { -/// QTC::TC("qpdf", "QPDFAnnotationObjectHelper explicit matrix"); + QTC::TC("qpdf", "QPDFAnnotationObjectHelper explicit matrix"); matrix = QPDFMatrix(matrix_obj.getArrayAsMatrix()); } else { -/// QTC::TC("qpdf", "QPDFAnnotationObjectHelper default matrix"); + QTC::TC("qpdf", "QPDFAnnotationObjectHelper default matrix"); } QPDFObjectHandle::Rectangle rect = rect_obj.getArrayAsRectangle(); if (rotate && flags.isInteger() && (flags.getIntValue() & 16)) @@ -176,7 +176,7 @@ QPDFAnnotationObjectHelper::getAnnotationAppearanceMatrix(int rotate) switch (rotate) { case 90: -/// QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 90"); + QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 90"); rect = QPDFObjectHandle::Rectangle( rect.llx, rect.ury, @@ -184,7 +184,7 @@ QPDFAnnotationObjectHelper::getAnnotationAppearanceMatrix(int rotate) rect.ury + rect_w); break; case 180: -/// QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 180"); + QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 180"); rect = QPDFObjectHandle::Rectangle( rect.llx - rect_w, rect.ury, @@ -192,7 +192,7 @@ QPDFAnnotationObjectHelper::getAnnotationAppearanceMatrix(int rotate) rect.ury + rect_h); break; case 270: -/// QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 270"); + QTC::TC("qpdf", "QPDFAnnotationObjectHelper rotate 270"); rect = QPDFObjectHandle::Rectangle( rect.llx - rect_h, rect.ury - rect_w, -- cgit v1.2.3-54-g00ecf