From 4355fda4abe7e7022e3e258c276ccba9e4713d91 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 27 Apr 2016 14:14:52 +0200 Subject: Tweak pdf-write option handling. The handling of not-decompressing images/fonts was geared towards pdfclean usage; but now that we can create new PDF files, it makes more sense to ask for images and fonts to be compressed, rather than asking for them not to be decompressed with quirky interaction with the 'expand' and 'deflate' flags. If -f or -i are set, we will never decompress images, and we will compress them if they are uncompressed. If -d is set, we will first decompress all streams (module -f or -i). If -z is set, we will then compress all uncompressed streams. --- docs/mutool/run.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs/mutool/run.html') diff --git a/docs/mutool/run.html b/docs/mutool/run.html index 0b8e86d1..f9278b2b 100644 --- a/docs/mutool/run.html +++ b/docs/mutool/run.html @@ -481,8 +481,18 @@ using low level access to the objects and streams contained in a PDF file.
Get access to the raw PDFDocument from a Document; returns null if the document is not a PDF.
PDFDocument#toDocument()
Cast the PDF document to a Document. -
PDFDocument#save(fileName) +
PDFDocument#save(fileName, options)
Write the PDF document to file. +The write options are a string of flag characters: +
l: linearize, +
g: garbage collect, gg: ...and compact, ggg: ...and de-duplicate, +
p: pretty-print objects, +
a: ascii hex encode streams, +
f: compress fonts, +
i: compress images, +
z: compress all streams, +
d: decompress all streams (except fonts or images if 'f' or 'i'), +
s: sanitize content streams.

@@ -631,7 +641,6 @@ There are several areas in MuPDF that still need bindings to access from JavaScr
  • Shadings
  • PDFDocument#graftObject() -
  • PDFDocument#save() -- write options
  • PDFWriteDevice
  • DocumentWriter
-- cgit v1.2.3