diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-06-24 00:23:06 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-06-24 00:23:06 +0200 |
commit | 4f305488d85f9237c561f04a88570f9b0584cb0d (patch) | |
tree | 68198ee2942078b45ee9b6cef9b457ec87b5b848 /include | |
parent | 7f95ad5b92922167629919e2f3ef1f8b4b13a15f (diff) | |
download | qpdf-4f305488d85f9237c561f04a88570f9b0584cb0d.tar.zst |
Improve the FILE* version of QPDF::processFile
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 0c6bf44d..59d26133 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -55,10 +55,12 @@ class QPDF // Parse a PDF from a stdio FILE*. The FILE must be open in // binary mode and must be seekable. It may be open read only. // This works exactly like processFile except that the PDF file is - // read from an already opened FILE*. The caller is responsible - // for closing the file. + // read from an already opened FILE*. If close_file is true, the + // file will be closed at the end. Otherwise, the caller is + // responsible for closing the file. QPDF_DLL - void processFile(FILE* file, char const* password = 0); + void processFile(char const* description, FILE* file, + bool close_file, char const* password = 0); // Parse a PDF file loaded into a memory buffer. This works // exactly like processFile except that the PDF file is in memory @@ -449,7 +451,7 @@ class QPDF public: FileInputSource(); void setFilename(char const* filename); - void setFile(FILE* filep); + void setFile(char const* description, FILE* filep, bool close_file); virtual ~FileInputSource(); virtual std::string const& getName() const; virtual qpdf_offset_t tell(); |