aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDF.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-07-28 05:42:27 +0200
committerJay Berkenbilt <ejb@ql.org>2017-07-28 05:42:27 +0200
commit7f8892525f897b17049f9e59bc4ce8ac28c9e082 (patch)
tree8f46d2ac355e8245cb2e0c764ebe0b34923e3494 /include/qpdf/QPDF.hh
parent428d96dfe19da96ac4759b190f5b25cf75ecdac6 (diff)
downloadqpdf-7f8892525f897b17049f9e59bc4ce8ac28c9e082.tar.zst
Add precheck streams capability
When requested, QPDFWriter will do more aggress prechecking of streams to make sure it can actually succeed in decoding them before attempting to do so. This will allow preservation of raw data even when the raw data is corrupted relative to the specified filters.
Diffstat (limited to 'include/qpdf/QPDF.hh')
-rw-r--r--include/qpdf/QPDF.hh14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index 18a6851f..ef9ce597 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -540,13 +540,14 @@ class QPDF
{
friend class QPDF_Stream;
private:
- static void pipeStreamData(QPDF* qpdf, int objid, int generation,
+ static bool pipeStreamData(QPDF* qpdf, int objid, int generation,
qpdf_offset_t offset, size_t length,
QPDFObjectHandle dict,
- Pipeline* pipeline)
+ Pipeline* pipeline, bool suppress_warnings)
{
- qpdf->pipeStreamData(
- objid, generation, offset, length, dict, pipeline);
+ return qpdf->pipeStreamData(
+ objid, generation, offset, length, dict, pipeline,
+ suppress_warnings);
}
};
friend class Pipe;
@@ -666,10 +667,11 @@ class QPDF
void findAttachmentStreams();
// Calls finish() on the pipeline when done but does not delete it
- void pipeStreamData(int objid, int generation,
+ bool pipeStreamData(int objid, int generation,
qpdf_offset_t offset, size_t length,
QPDFObjectHandle dict,
- Pipeline* pipeline);
+ Pipeline* pipeline,
+ bool suppress_warnings);
// For QPDFWriter: