diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-02-23 13:57:14 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-02-23 14:26:21 +0100 |
commit | be3a8c0e7a5edd30cb8a0f2e7cbc56d0e5bed982 (patch) | |
tree | 4ae317e88688112402864345b8a9ed15de8f8b56 /include/qpdf | |
parent | 50037fb33de9681d63bb030bf7d0aca1acbda55a (diff) | |
download | qpdf-be3a8c0e7a5edd30cb8a0f2e7cbc56d0e5bed982.tar.zst |
Keep only referenced form fields in --pages
Diffstat (limited to 'include/qpdf')
-rw-r--r-- | include/qpdf/QPDFAcroFormDocumentHelper.hh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/qpdf/QPDFAcroFormDocumentHelper.hh b/include/qpdf/QPDFAcroFormDocumentHelper.hh index fd28a579..8f2b18dc 100644 --- a/include/qpdf/QPDFAcroFormDocumentHelper.hh +++ b/include/qpdf/QPDFAcroFormDocumentHelper.hh @@ -140,7 +140,7 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper std::vector<QPDFAnnotationObjectHelper> getWidgetAnnotationsForPage(QPDFPageObjectHelper); - // Return form fields for a page. + // Return top-level form fields for a page. QPDF_DLL std::vector<QPDFFormFieldObjectHelper> getFormFieldsForPage(QPDFPageObjectHelper); @@ -210,11 +210,15 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper QPDFAcroFormDocumentHelper* from_afdh = nullptr); // Copy form fields from a page in a different QPDF object to this - // QPDF. + // QPDF. If copied_fields is not null, it will be initialized with + // the fields that were copied. Items in the vector are objects in + // the receiving QPDF (the one associated with this + // QPDFAcroFormDocumentHelper). QPDF_DLL void copyFieldsFromForeignPage( QPDFPageObjectHelper foreign_page, - QPDFAcroFormDocumentHelper& foreign_afdh); + QPDFAcroFormDocumentHelper& foreign_afdh, + std::vector<QPDFObjectHandle>* copied_fields = nullptr); private: void analyze(); |