From 3d22bf8ba1c824f6722be63d9b5109fce56e076c Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Tue, 17 Jul 2018 13:17:30 +0100 Subject: Have pdfapp_save close and reopen the document in all cases We need to do this, because much can change on saving, objects renumbered and moved, and we could run into inconsistencies between the file and in-memory information. This function was already reopening in the case of saving back to the same file, but in other cases. --- platform/x11/pdfapp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'platform') diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index a3ad0947..01011b2b 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -549,6 +549,8 @@ static int pdfapp_save(pdfapp_t *app) { wincopyfile(app->docpath, buf); pdf_save_document(app->ctx, idoc, buf, &opts); + pdfapp_close(app); + pdfapp_open(app, buf, 1); return 1; } -- cgit v1.2.3