diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-05-04 18:00:37 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-05-13 11:42:00 +0200 |
commit | 9dda5aa73d6dcb72c9f10b87564afe7491575faf (patch) | |
tree | 31c3e2b2fb16431ad7236f7a44e206a3a391061b /docs | |
parent | 74d75a7a6f3ea4bef5b4489c65e8a876ae480c76 (diff) | |
download | mupdf-9dda5aa73d6dcb72c9f10b87564afe7491575faf.tar.xz |
Add long output option parsing.
Use comma-separated list of flags and key/value pairs, for
example: "linearize,resolution=72,colorspace=gray"
Diffstat (limited to 'docs')
-rw-r--r-- | docs/mutool/examples/pdf-create.js | 2 | ||||
-rw-r--r-- | docs/mutool/examples/pdf-merge.js | 2 | ||||
-rw-r--r-- | docs/mutool/run.html | 22 |
3 files changed, 14 insertions, 12 deletions
diff --git a/docs/mutool/examples/pdf-create.js b/docs/mutool/examples/pdf-create.js index 131e72b3..290d1737 100644 --- a/docs/mutool/examples/pdf-create.js +++ b/docs/mutool/examples/pdf-create.js @@ -32,4 +32,4 @@ var page = pdf.addPage([0,0,300,350], 0, resources, contents) pdf.insertPage(-1, page) // Save the document to file. -pdf.save("out.pdf", "paif") +pdf.save("out.pdf", "pretty,ascii,compress-images,compress-fonts") diff --git a/docs/mutool/examples/pdf-merge.js b/docs/mutool/examples/pdf-merge.js index 6f5d4692..dd5fb2a5 100644 --- a/docs/mutool/examples/pdf-merge.js +++ b/docs/mutool/examples/pdf-merge.js @@ -57,7 +57,7 @@ function pdfmerge() { srcDoc = new PDFDocument(argv[i]) copyAllPages(dstDoc, srcDoc) } - dstDoc.save(argv[1], "z") + dstDoc.save(argv[1], "compress") } if (argv.length < 3) diff --git a/docs/mutool/run.html b/docs/mutool/run.html index f9278b2b..ac76a7f5 100644 --- a/docs/mutool/run.html +++ b/docs/mutool/run.html @@ -483,16 +483,18 @@ using low level access to the objects and streams contained in a PDF file. <dd>Cast the PDF document to a Document. <dt>PDFDocument#save(fileName, options) <dd>Write the PDF document to file. -The write options are a string of flag characters: -<br>l: linearize, -<br>g: garbage collect, gg: ...and compact, ggg: ...and de-duplicate, -<br>p: pretty-print objects, -<br>a: ascii hex encode streams, -<br>f: compress fonts, -<br>i: compress images, -<br>z: compress all streams, -<br>d: decompress all streams (except fonts or images if 'f' or 'i'), -<br>s: sanitize content streams. +The write options are a string of comma separated options: +<br>linearize (optimize for "web"), +<br>garbage (remove unused objects), +<br>or garbage=compact (... and compact xref table), +<br>or garbage=deduplicate (... and remove duplicate objects), +<br>pretty (pretty-print objects), +<br>ascii (ascii hex encode streams), +<br>compress-fonts (compress embedded font data), +<br>compress-images (compress image data), +<br>compress (compress all streams), +<br>decompress (decompress all streams (except fonts or images if compress-fonts/images)), +<br>sanitize (sanitize content streams). </dl> <h3> |