From bedf35d6a55a9092485d56002b50bc9003ce7931 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 2 Jan 2021 12:05:09 -0500 Subject: Bug fix: avoid extraneous pipeline finish calls with multiple contents Avoid calling finish() multiple times on the pipeline passed to pipeContentStreams. This commit also fixes a bug in which qpdf was not exiting with the proper exit status if warnings found while splitting pages; this was exposed by a test case that changed. --- include/qpdf/QPDFPageObjectHelper.hh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh index 93745446..1152a7a5 100644 --- a/include/qpdf/QPDFPageObjectHelper.hh +++ b/include/qpdf/QPDFPageObjectHelper.hh @@ -199,12 +199,7 @@ 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. Call on a page object. Please note that if there is an - // array of content streams, p->finish() is called after each - // stream. If you pass a pipeline that doesn't allow write() to be - // called after finish(), you can wrap it in an instance of - // Pl_Concatenate and then call manualFinish() on the - // Pl_Concatenate pipeline at the end. + // streams. QPDF_DLL void pipePageContents(Pipeline* p); -- cgit v1.2.3-54-g00ecf