aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-05 14:50:39 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-05 17:29:25 +0100
commitb48a0ff0e8e1861884b2dac62d98d39f8e194086 (patch)
tree54d6130cbfa0bebf23d5ff77ac67954d20fa5bbc /include
parent8cf7f2bfb542b1583aa525611179d1a545f945d5 (diff)
downloadqpdf-b48a0ff0e8e1861884b2dac62d98d39f8e194086.tar.zst
Add qpdf_empty_pdf to C API
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/qpdf-c.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h
index 5a0595b2..982f0c90 100644
--- a/include/qpdf/qpdf-c.h
+++ b/include/qpdf/qpdf-c.h
@@ -178,9 +178,9 @@ extern "C" {
char const* qpdf_get_qpdf_version();
/* Returns dynamically allocated qpdf_data pointer; must be freed
- * by calling qpdf_cleanup. You must call qpdf_read or one of the
- * other qpdf_read_* functions before calling any function that
- * would need to operate on the PDF file.
+ * by calling qpdf_cleanup. You must call qpdf_read, one of the
+ * other qpdf_read_* functions, or qpdf_empty_pdf before calling
+ * any function that would need to operate on the PDF file.
*/
QPDF_DLL
qpdf_data qpdf_init();
@@ -289,6 +289,13 @@ extern "C" {
unsigned long long size,
char const* password);
+ /* Calling qpdf_empty_pdf initializes this qpdf object with an
+ * empty PDF, making it possible to create a PDF from scratch
+ * using the C API. Added in 10.6.
+ */
+ QPDF_DLL
+ QPDF_ERROR_CODE qpdf_empty_pdf(qpdf_data qpdf);
+
/* Read functions below must be called after qpdf_read or
* qpdf_read_memory. */