diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-12-17 22:38:35 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-18 15:32:14 +0100 |
commit | 80949d3d6b6320f5643a450c382f19370922e78f (patch) | |
tree | 7e3a6612d9c2985c3c3c493182d4171d017b4456 /platform/x11 | |
parent | 02d5b2280db2846e4a683944819eb395ab15b8ce (diff) | |
download | mupdf-80949d3d6b6320f5643a450c382f19370922e78f.tar.xz |
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.
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/pdfapp.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) |