From 65b8ae915465849babc1fa712971c701136f4ed5 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 14 May 2012 19:34:35 +0100 Subject: Add linearization to pdf_write function. Extend mupdfclean to have a new -l file that writes the file linearized. This should still be considered experimental When writing a pdf file, analyse object use, flatten resource use, reorder the objects, generate a hintstream and output with linearisaton parameters. This is enough for Acrobat to accept the file as being optimised for Fast Web View. We ought to add more tables to the hintstream in some cases, but I doubt anyone actually uses it, the spec is so badly written. Certainly acrobat accepts the file as being optimised for 'Fast Web View'. Update fz_dict_put to allow for us adding a reference to the dictionary that is the sole owner of that reference already (i.e. don't drop then keep something that has a reference count of just 1). Update pdf_load_image_stream to use the stm_buf from the xref if there is one. Update pdf_close_document to discard any stm_bufs it may be holding. Update fz_dict_put to be pdf_dict_put - this was missed in a renaming ages ago and has been inconsistent since. --- apps/mupdfposter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/mupdfposter.c') diff --git a/apps/mupdfposter.c b/apps/mupdfposter.c index 317c2c5d..f65495a8 100644 --- a/apps/mupdfposter.c +++ b/apps/mupdfposter.c @@ -135,9 +135,9 @@ int pdfposter_main(int argc, char **argv) pdf_document *xref; fz_context *ctx; - opts.dogarbage = 0; - opts.doexpand = 0; - opts.doascii = 0; + opts.do_garbage = 0; + opts.do_expand = 0; + opts.do_ascii = 0; while ((c = fz_getopt(argc, argv, "x:y:")) != -1) { -- cgit v1.2.3