diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/jni/mupdf.c | 7 | ||||
-rw-r--r-- | platform/ios/Classes/MuDocumentController.m | 8 | ||||
-rw-r--r-- | platform/win32/libmupdf.vcproj | 4 | ||||
-rw-r--r-- | platform/x11/pdfapp.c | 10 |
4 files changed, 17 insertions, 12 deletions
diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c index b927bd57..e91eea70 100644 --- a/platform/android/jni/mupdf.c +++ b/platform/android/jni/mupdf.c @@ -2593,11 +2593,12 @@ JNI_FN(MuPDFCore_saveInternal)(JNIEnv * env, jobject thiz) { globals *glo = get_globals(env, thiz); fz_context *ctx = glo->ctx; + pdf_document *idoc = pdf_specifics(ctx, glo->doc); - if (glo->doc && glo->current_path) + if (idoc && glo->current_path) { char *tmp; - fz_save_options opts; + pdf_write_options opts; opts.do_incremental = 1; opts.do_ascii = 0; opts.do_expand = 0; @@ -2631,7 +2632,7 @@ JNI_FN(MuPDFCore_saveInternal)(JNIEnv * env, jobject thiz) if (!err) { - fz_save_document(ctx, glo->doc, tmp, &opts); + pdf_save_document(ctx, idoc, tmp, &opts); written = 1; } } 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; } } diff --git a/platform/win32/libmupdf.vcproj b/platform/win32/libmupdf.vcproj index 7c4b12be..a5fc9f2d 100644 --- a/platform/win32/libmupdf.vcproj +++ b/platform/win32/libmupdf.vcproj @@ -1558,10 +1558,6 @@ > </File> <File - RelativePath="..\..\include\mupdf\fitz\write-document.h" - > - </File> - <File RelativePath="..\..\include\mupdf\fitz\xml.h" > </File> diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 314592a1..82c711dc 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -549,9 +549,13 @@ static int pdfapp_save(pdfapp_t *app) { char buf[PATH_MAX]; + pdf_document *idoc = pdf_specifics(app->ctx, app->doc); + if (!idoc) + return 0; + if (wingetsavepath(app, buf, PATH_MAX)) { - fz_save_options opts; + pdf_write_options opts; opts.do_incremental = 1; opts.do_ascii = 0; @@ -562,7 +566,7 @@ static int pdfapp_save(pdfapp_t *app) if (strcmp(buf, app->docpath) != 0) { wincopyfile(app->docpath, buf); - fz_save_document(app->ctx, app->doc, buf, &opts); + pdf_save_document(app->ctx, idoc, buf, &opts); return 1; } @@ -573,7 +577,7 @@ static int pdfapp_save(pdfapp_t *app) fz_try(app->ctx) { wincopyfile(app->docpath, buf); - fz_save_document(app->ctx, app->doc, buf, &opts); + pdf_save_document(app->ctx, idoc, buf, &opts); written = 1; } fz_catch(app->ctx) |