summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-10 16:06:27 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-13 13:09:09 +0100
commit3aacd38b1f559b4dc9b8f420f39915575fb8ad2d (patch)
tree699268e2d0e0e0cf5d9509a24d1f324e25c32bab /include
parentd93f4d8433c0cc1f40533663a0d2ec509f973dbc (diff)
downloadmupdf-3aacd38b1f559b4dc9b8f420f39915575fb8ad2d.tar.xz
Add pdf_write_document.
Allow us to write a document to an fz_output as opposed to just a filename. We cannot write digital signatures in this method though. Will ponder that in a later commit.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/pdf/document.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h
index 857f2d58..6248145e 100644
--- a/include/mupdf/pdf/document.h
+++ b/include/mupdf/pdf/document.h
@@ -409,6 +409,19 @@ struct pdf_write_options_s
void pdf_parse_write_options(fz_context *ctx, pdf_write_options *opts, const char *args);
/*
+ pdf_has_unsaved_sigs: Returns true if there are digital signatures waiting to
+ to updated on save.
+*/
+int pdf_has_unsaved_sigs(fz_context *ctx, pdf_document *doc);
+
+/*
+ pdf_write_document: Write out the document to an output stream with all changes finalised.
+
+ This method will throw an error if pdf_has_unsaved_sigs.
+*/
+void pdf_write_document(fz_context *ctx, pdf_document *doc, fz_output *out, pdf_write_options *opts);
+
+/*
pdf_save_document: Write out the document to a file with all changes finalised.
*/
void pdf_save_document(fz_context *ctx, pdf_document *doc, const char *filename, pdf_write_options *opts);