From 80949d3d6b6320f5643a450c382f19370922e78f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 17 Dec 2015 22:38:35 +0100 Subject: Remove fz_save_document and use pdf_save_document directly instead. In preparation of adding pdf_write_document that writes a document to a fz_output stream. --- platform/ios/Classes/MuDocumentController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'platform/ios/Classes') diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index b30d516c..d1c685d0 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -70,13 +70,17 @@ static char *tmp_path(char *path) static void saveDoc(char *current_path, fz_document *doc) { char *tmp; - fz_write_options opts; + pdf_document *idoc = pdf_specifics(ctx, doc); + pdf_write_options opts; opts.do_incremental = 1; opts.do_ascii = 0; opts.do_expand = 0; opts.do_garbage = 0; opts.do_linear = 0; + if (!idoc) + return; + tmp = tmp_path(current_path); if (tmp) { @@ -105,7 +109,7 @@ static void saveDoc(char *current_path, fz_document *doc) if (!err) { - fz_write_document(ctx, doc, tmp, &opts); + pdf_write_document(ctx, idoc, tmp, &opts); written = 1; } } -- cgit v1.2.3