mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
Use ClosedFileInputSource when merging files (fixes #154)
This commit is contained in:
parent
4ccc8b1a44
commit
99593e0eef
@ -1,5 +1,9 @@
|
||||
2018-06-22 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* Don't leave files open when merging. This makes it possible
|
||||
merge more files at once than the operating system's open file
|
||||
limit. Fixes #154.
|
||||
|
||||
* Add ClosedFileInputSource class, and input source that keeps its
|
||||
input file closed when not reading it. At the expense of some
|
||||
performance, this allows you to operate on many files without
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <qpdf/QUtil.hh>
|
||||
#include <qpdf/QTC.hh>
|
||||
#include <qpdf/ClosedFileInputSource.hh>
|
||||
#include <qpdf/Pl_StdioFile.hh>
|
||||
#include <qpdf/Pl_Discard.hh>
|
||||
#include <qpdf/PointerHolder.hh>
|
||||
@ -2083,8 +2084,9 @@ static void handle_page_specs(QPDF& pdf, Options& o,
|
||||
QTC::TC("qpdf", "qpdf pages encryption password");
|
||||
password = o.encryption_file_password;
|
||||
}
|
||||
qpdf->processFile(
|
||||
page_spec.filename.c_str(), password);
|
||||
qpdf->processInputSource(
|
||||
new ClosedFileInputSource(
|
||||
page_spec.filename.c_str()), password);
|
||||
page_spec_qpdfs[page_spec.filename] = qpdf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user