diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-04 12:11:20 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-04 12:11:20 +0100 |
commit | ac84904af638b243284e24d5f401c3f1a21cb0ef (patch) | |
tree | 32e9f6b3b0d0ad83cb8f2dd0c41bc5e60b53ed3e /platform/x11/pdfapp.c | |
parent | b33b3b41100f2bb0b63dbf270bdd4401451c081a (diff) | |
download | mupdf-ac84904af638b243284e24d5f401c3f1a21cb0ef.tar.xz |
Update pdf_write_document to support incremental update
Diffstat (limited to 'platform/x11/pdfapp.c')
-rw-r--r-- | platform/x11/pdfapp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index e76c6c7c..71561f14 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -299,13 +299,15 @@ static int pdfapp_save(pdfapp_t *app) { fz_write_options opts; - opts.do_ascii = 1; + opts.do_incremental = 1; + opts.do_ascii = 0; opts.do_expand = 0; - opts.do_garbage = 1; + opts.do_garbage = 0; opts.do_linear = 0; if (strcmp(buf, app->docpath) != 0) { + wincopyfile(app->docpath, buf); fz_write_document(app->doc, buf, &opts); return 1; } @@ -316,6 +318,7 @@ static int pdfapp_save(pdfapp_t *app) fz_try(app->ctx) { + wincopyfile(app->docpath, buf); fz_write_document(app->doc, buf, &opts); written = 1; } |