mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
Reset state in QPDF::calculateLinearizationData
This makes it possible to use two different writers to write linearized files from the same QPDF object.
This commit is contained in:
parent
8d2b29ef98
commit
fc4c82a950
@ -1,5 +1,10 @@
|
||||
2012-09-06 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* Make it possible to write the same QPDF object with two
|
||||
different QPDFWriter objects that have both called
|
||||
setLinearization(true) by making private method
|
||||
QPDF::calculateLinearizationData() properly initialize its state.
|
||||
|
||||
* Bug fix: Writing after calling QPDFWriter::setOutputMemory()
|
||||
would cause a segmentation fault because of an internal field not
|
||||
being initialized, rendering that method useless. This has been
|
||||
|
@ -1241,6 +1241,16 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
|
||||
|
||||
// * outlines: part 6 or 9
|
||||
|
||||
this->part4.clear();
|
||||
this->part6.clear();
|
||||
this->part7.clear();
|
||||
this->part8.clear();
|
||||
this->part9.clear();
|
||||
this->c_linp = LinParameters();
|
||||
this->c_page_offset_data = CHPageOffset();
|
||||
this->c_shared_object_data = CHSharedObject();
|
||||
this->c_outline_data = HGeneric();
|
||||
|
||||
QPDFObjectHandle root = getRoot();
|
||||
bool outlines_in_first_page = false;
|
||||
QPDFObjectHandle pagemode = root.getKey("/PageMode");
|
||||
|
Loading…
Reference in New Issue
Block a user