From 3aacd38b1f559b4dc9b8f420f39915575fb8ad2d Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 10 Jun 2016 16:06:27 +0100 Subject: 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. --- include/mupdf/pdf/document.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') 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 @@ -408,6 +408,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. */ -- cgit v1.2.3