aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-01-31 22:45:52 +0100
committerJay Berkenbilt <ejb@ql.org>2018-02-19 02:18:40 +0100
commitebd5ed63decb90e26ae9129164214f9d7d684621 (patch)
treea4d8960a1c9f270315f9c9c3fff884b0198d9087 /include
parenta0fd8875aabb244d35e2ddf785f546c336ed9622 (diff)
downloadqpdf-ebd5ed63decb90e26ae9129164214f9d7d684621.tar.zst
Add option to save pass 1 of lineariziation
This is useful only for debugging the linearization code.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFWriter.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh
index c831c2ca..cdd63e47 100644
--- a/include/qpdf/QPDFWriter.hh
+++ b/include/qpdf/QPDFWriter.hh
@@ -367,6 +367,15 @@ class QPDFWriter
QPDF_DLL
void setLinearization(bool);
+ // For debugging QPDF: provide the name of a file to write pass1
+ // of linearization to. The only reason to use this is to debug
+ // QPDF. To linearize, QPDF writes out the file in two passes.
+ // Usually the first pass is discarded, but lots of computations
+ // are made in pass 1. If a linearized file comes out wrong, it
+ // can be helpful to look at the first pass.
+ QPDF_DLL
+ void setLinearizationPass1Filename(std::string const&);
+
// Create PCLm output. This is only useful for clients that know
// how to create PCLm files. If a file is structured exactly as
// PCLm requires, this call will tell QPDFWriter to write the PCLm
@@ -571,6 +580,7 @@ class QPDFWriter
std::string deterministic_id_data;
// For linearization only
+ std::string lin_pass1_filename;
std::map<int, int> obj_renumber_no_gen;
std::map<int, int> object_to_object_stream_no_gen;
};