diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 01:18:57 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 01:19:11 +0200 |
commit | 3a1ff5ded9cf22e114991b5a49857b54f8e56b02 (patch) | |
tree | 3a3ef059215f619946c316fa6c94d31c6f6b076f /include/qpdf | |
parent | a94a729fee946947db7a056f02b326dfce681128 (diff) | |
download | qpdf-3a1ff5ded9cf22e114991b5a49857b54f8e56b02.tar.zst |
Add option to preserve unreferenced objects
Diffstat (limited to 'include/qpdf')
-rw-r--r-- | include/qpdf/QPDF.hh | 6 | ||||
-rw-r--r-- | include/qpdf/QPDFWriter.hh | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index ef9ce597..ad8503dc 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -396,6 +396,12 @@ class QPDF QPDF_DLL void showXRefTable(); + // Returns a list of indirect objects for every object in the xref + // table. Useful for discovering objects that are not otherwised + // referenced. + QPDF_DLL + std::vector<QPDFObjectHandle> getAllObjects(); + // Optimization support -- see doc/optimization. Implemented in // QPDF_optimization.cc diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 2687cce0..fd35fecd 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -155,6 +155,12 @@ class QPDFWriter QPDF_DLL void setPrecheckStreams(bool); + // Preserve unreferenced objects. The default behavior is to + // discard any object that is not visited during a traversal of + // the object structure from the trailer. + QPDF_DLL + void setPreserveUnreferencedObjects(bool); + // Set the minimum PDF version. If the PDF version of the input // file (or previously set minimum version) is less than the // version passed to this method, the PDF version of the output @@ -427,6 +433,7 @@ class QPDFWriter qpdf_stream_data_e stream_data_mode; bool qdf_mode; bool precheck_streams; + bool preserve_unreferenced_objects; bool static_id; bool suppress_original_object_ids; bool direct_stream_lengths; |