From d4d7630cf544dc295202382026658b55bf49f76b Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 26 Dec 2020 11:13:00 -0500 Subject: Add pdf-custom-filter example --- include/qpdf/QPDFObjectHandle.hh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 060d21e1..ac59d428 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -92,6 +92,15 @@ class QPDFObjectHandle // writing linearized files, if the work done by your stream // data provider is slow or computationally intensive, you // might want to implement your own cache. + // + // * Once you have called replaceStreamData, the original + // stream data is no longer directly accessible from the + // stream, but this is easy to work around by copying the + // stream to a separate QPDF object. The qpdf library + // implements this very efficiently without actually making + // a copy of the stream data. You can find examples of this + // pattern in some of the examples, including + // pdf-custom-filter.cc and pdf-invert-images.cc. // Prior to qpdf 10.0.0, it was not possible to handle errors // the way pipeStreamData does or to pass back success. -- cgit v1.2.3-54-g00ecf