diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-06-21 13:59:56 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-06-21 14:00:35 +0200 |
commit | bc1c4bb57864c4dbe9b7e42a77e0653c0d473071 (patch) | |
tree | 1c4549bdeb5cbbe70aef0ad87ba3389565219d56 /include | |
parent | ed6a56a3cdb7fcaa41d87bf90bc0b8c7ef0d761c (diff) | |
download | qpdf-bc1c4bb57864c4dbe9b7e42a77e0653c0d473071.tar.zst |
Add QPDF::processFile that takes an open FILE*
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index ee9dba87..26f9cdc9 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -52,6 +52,14 @@ class QPDF QPDF_DLL void processFile(char const* filename, char const* password = 0); + // 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. + QPDF_DLL + void processFile(FILE* 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 // instead of on disk. The description appears in any warning or @@ -400,6 +408,7 @@ class QPDF public: FileInputSource(); void setFilename(char const* filename); + void setFile(FILE* filep); virtual ~FileInputSource(); virtual std::string const& getName() const; virtual off_t tell(); @@ -414,6 +423,7 @@ class QPDF void destroy(); + bool close_file; std::string filename; FILE* file; }; |