summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-01-02 20:05:17 +0100
committerJay Berkenbilt <ejb@ql.org>2021-01-02 20:08:53 +0100
commit3be58f49e57da67cf79b61061d8b1a0f7ccf7cff (patch)
tree2d651afb06b9037d5dc8aab2745ea9e65652885f /include
parent98da4fd83527f47a28132ff4a120bc043d9e58f6 (diff)
downloadqpdf-3be58f49e57da67cf79b61061d8b1a0f7ccf7cff.tar.zst
Make more QPDFPageObjectHelper methods work with form XObject
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFObjectHandle.hh6
-rw-r--r--include/qpdf/QPDFPageObjectHelper.hh13
2 files changed, 15 insertions, 4 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index 2a5d0392..e310f091 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -448,7 +448,7 @@ class QPDFObjectHandle
void parsePageContents(ParserCallbacks* callbacks);
QPDF_DLL
void filterPageContents(TokenFilter* filter, Pipeline* next = 0);
- // See comments for QPDFPageObjectHelper::pipePageContents.
+ // See comments for QPDFPageObjectHelper::pipeContents.
QPDF_DLL
void pipePageContents(Pipeline* p);
QPDF_DLL
@@ -460,6 +460,10 @@ class QPDFObjectHandle
// XObject, whose data is in the same format as a content stream.
QPDF_DLL
void filterAsContents(TokenFilter* filter, Pipeline* next = 0);
+ // Called on a stream to parse the stream as page contents. This
+ // can be used to parse a form XObject.
+ QPDF_DLL
+ void parseAsContents(ParserCallbacks* callbacks);
// Type-specific factories
QPDF_DLL
diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh
index ccf56630..ee813c96 100644
--- a/include/qpdf/QPDFPageObjectHelper.hh
+++ b/include/qpdf/QPDFPageObjectHelper.hh
@@ -182,7 +182,11 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
// Parse a page's contents through ParserCallbacks, described
// above. This method works whether the contents are a single
- // stream or an array of streams. Call on a page object.
+ // stream or an array of streams. Call on a page object. Also
+ // works for form XObjects.
+ QPDF_DLL
+ void parseContents(QPDFObjectHandle::ParserCallbacks* callbacks);
+ // Old name
QPDF_DLL
void parsePageContents(QPDFObjectHandle::ParserCallbacks* callbacks);
@@ -206,14 +210,17 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
// Pipe a page's contents through the given pipeline. This method
// works whether the contents are a single stream or an array of
- // streams.
+ // streams. Also works on form XObjects.
+ QPDF_DLL
+ void pipeContents(Pipeline* p);
+ // Old name
QPDF_DLL
void pipePageContents(Pipeline* p);
// Attach a token filter to a page's contents. If the page's
// contents is an array of streams, it is automatically coalesced.
// The token filter is applied to the page's contents as a single
- // stream.
+ // stream. Also works on form XObjects.
QPDF_DLL
void addContentTokenFilter(
PointerHolder<QPDFObjectHandle::TokenFilter> token_filter);