diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-09-23 23:42:26 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-09-23 23:42:26 +0200 |
commit | 041397fdabde66574824db7582a26ef1e3fbfc65 (patch) | |
tree | bb9d46db2082978e8c7fbbe4373e5df8e70e68b1 /include | |
parent | 8c99e4a6c0f79c62fb9983404086c72ecf54ac83 (diff) | |
download | qpdf-041397fdabde66574824db7582a26ef1e3fbfc65.tar.zst |
Allow reading from InputSource and writing to Pipeline
Allowing users to subclass InputSource and Pipeline to read and write
from/to arbitrary sources provides the maximum flexibility for users
who want to read and write from other than files or memory.
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 7 | ||||
-rw-r--r-- | include/qpdf/QPDFWriter.hh | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index e594a44a..64858625 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -72,6 +72,13 @@ class QPDF char const* buf, size_t length, char const* password = 0); + // Parse a PDF file loaded from a custom InputSource. If you have + // your own method of retrieving a PDF file, you can subclass + // InputSource and use this method. + QPDF_DLL + void processInputSource(PointerHolder<InputSource>, + char const* password = 0); + // Create a QPDF object for an empty PDF. This PDF has no pages // or objects other than a minimal trailer, a document catalog, // and a /Pages tree containing zero pages. Pages and other diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 2c1c32f6..725b2be8 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -95,6 +95,15 @@ class QPDFWriter QPDF_DLL Buffer* getBuffer(); + // Supply your own pipeline object. Output will be written to + // this pipeline, and QPDFWriter will call finish() on the + // pipeline. It is the caller's responsibility to manage the + // memory for the pipeline. The pipeline is never deleted by + // QPDFWriter, which makes it possible for you to call additional + // methods on the pipeline after the writing is finished. + QPDF_DLL + void setOutputPipeline(Pipeline*); + // Setting Parameters // Set the value of object stream mode. In disable mode, we never |