comparison mupdf-source/docs/man/mutool.1 @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 .TH "MUTOOL" "1" "April 14, 2025"
2 .\" Please adjust this date whenever revising the manpage.
3 .\" no hyphenation
4 .nh
5 .\" adjust left
6 .ad l
7
8 .SH NAME
9 mutool \- all purpose tool for dealing with PDF files
10
11 .SH SYNOPSIS
12 mutool <sub-command> [options]
13
14 .SH VERSION
15 mutool -v
16 .PP
17 Shows the MuPDF version used to build mutool.
18
19 .SH DESCRIPTION
20 mutool is a tool based on MuPDF for dealing with document files in various manners.
21 There are several sub commands available, as described below.
22
23 .SH DRAW
24 mutool draw [options] file [pages]
25 .PP
26 The draw command will render a document to image files,
27 convert to another vector format, or extract the text content.
28 .PP
29 The supported input document formats are: pdf, xps, cbz, and epub.
30 .PP
31 The supported output image formats are: pbm, pgm, ppm, pam, png, pwg, pcl and ps.
32 The supported output vector formats are: svg, pdf, and debug trace (as xml).
33 The supported output text formats are: plain text, html, and structured text (as xml).
34 .TP
35 .B \-p password
36 Use the specified password if the file is encrypted.
37 .TP
38 .B \-o output
39 The output format is inferred from the output filename.
40 Embed %d in the name to indicate the page number (for example: "page%d.png").
41 Printf modifiers are supported, for example "%03d".
42 If no output is specified, the output will go to stdout.
43 .TP
44 .B \-F format
45 Enforce a specific output format. Only necessary when outputting to stdout
46 since normally the output filename is used to infer the output format.
47 .TP
48 .B \-q
49 Be quiet, do not print progress messages.
50 .TP
51 .B \-R angle
52 Rotate clockwise by given number of degrees.
53 .TP
54 .B \-r resolution
55 Render the page at the specified resolution.
56 The default resolution is 72 dpi.
57 .TP
58 .B \-w width
59 Render the page at the specified width (or, if the -r flag is used,
60 render with a maximum width).
61 .TP
62 .B \-h height
63 Render the page at the specified height (or, if the -r flag is used,
64 render with a maximum height).
65 .TP
66 .B \-f
67 Fit exactly; ignore the aspect ratio when matching specified width/heights.
68 .TP
69 .B \-b box
70 Use name page box (`MediaBox`, `CropBox`, `BleedBox`, `TrimBox`, or `ArtBox`), see :ref:`defined boxes<mutool_trim_defined_boxes>`.
71 .TP
72 .B \-B bandheight
73 Render in banded mode with each band no taller than the given height. This uses
74 less memory during rendering. Only compatible with pam, pgm, ppm, pnm and png
75 output formats. Banded rendering and md5 checksumming may not be used at the
76 same time.
77 .TP
78 .B \-T threads
79 Number of threads to use for rendering (banded mode only).
80 .TP
81 .B \-W width
82 Page width in points for EPUB layout.
83 .TP
84 .B \-H height
85 Page height in points for EPUB layout.
86 .TP
87 .B \-S size
88 Font size in points for EPUB layout.
89 .TP
90 .B \-U filename
91 User CSS stylesheet for EPUB layout.
92 .TP
93 .B \-X
94 Disable document styles for EPUB layout.
95 .TP
96 .B \-a
97 Disable usage of accelerator file.
98 .TP
99 .B \-c colorspace
100 Render in the specified colorspace.
101 Supported colorspaces are: \fBmono\fR, \fBgray\fR, \fBgrayalpha\fR, \fBrgb\fR, \fBrgbalpha\fR, \fBcmyk\fR, \fBcmykalpha\fR.
102 Some abbreviations are allowed: \fBm\fR, \fBg\fR, \fBga\fR, \fBrgba\fR, \fBcmyka\fR.
103 The default is chosen based on the output format.
104 .TP
105 .B \-e filename
106 Proof ICC profile filename to use for rendering.
107 .TP
108 .B -G gamma
109 Apply gamma correction.
110 Some typical values are 0.7 or 1.4 to thin or darken text rendering.
111 .TP
112 .B -I
113 Invert colors.
114 .TP
115 .B \-s [mft5]
116 Show various bits of information:
117 .B m
118 for glyph cache and total memory usage,
119 .B f
120 for page features such as whether the page is grayscale or color,
121 .B t
122 for per page rendering times as well statistics, and
123 .B 5
124 for md5 checksums of rendered images that can be used to check if rendering has
125 changed.
126 .TP
127 .B \-A bits
128 Specify how many bits of anti-aliasing to use. The default is 8.
129 .TP
130 .B \-A bits/bits
131 Specify how many bits of anti-aliasing to use. The default is 8. Bits for graphics is before the slash, bits for text after the slash.
132 .TP
133 .B \-l width
134 Minimum stroked line width (in pixels).
135 .TP
136 .B \-K
137 Do not draw text.
138 .TP
139 .B \-KK
140 Only draw text.
141 .TP
142 .B \-D
143 Disable use of display lists. May cause slowdowns, but should reduce
144 the amount of memory used.
145 .TP
146 .B \-i
147 Ignore errors.
148 .TP
149 .B \-m limit
150 Limit memory usage in bytes.
151 .TP
152 .B \-L
153 Low memory mode (avoid caching objects by clearing cache after each page).
154 .TP
155 .B \-P
156 Run interpretation and rendering at the same time.
157 .TP
158 .B \-N
159 Disable ICC workflow.
160 .TP
161 .B \-O overprint
162 Control spot/overprint rendering: \fB0\fR for no spot rendering, \fB1\fR for Overprint simulation (default), or \fB2f\R for full spot rendering.
163 .TP
164 .B \-t language
165 Specify language/script for OCR (default: eng)
166 .TP
167 .B \-d ocr-file-path
168 Specify path for OCR files (default: rely on \fBTESSDATA_PREFIX\fR environment variable.
169 .TP
170 .B \-k correction
171 Set the skew correction, either one of \fBauto\fR, \fB0\fR for increase size, \fB1\fR for maintain size, or \fB2\fR for decrease size.
172 .TP
173 .B \-k correction,angle
174 Set the skew correction as well as the angle.
175 .TP
176 .B \-y l
177 Print the layer configs to stderr.
178 .TP
179 .B \-y layer-number
180 Select layer config (by number from \fB-y l\fR).
181 .TP
182 .B \-y layer-number,item1,item2,...
183 Select layer config (by number from \fB-y l\fR) and toggle the listed items.
184 .TP
185 .B \-Y
186 Print the individual layers to stderr.
187 .TP
188 .B \-z layer-number
189 Hide individual layer.
190 .TP
191 .B \-Z layer-number
192 Show individual layer.
193
194 .TP
195 .B pages
196 Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
197 If no pages are specified, then all pages will be rendered.
198
199 .SH CLEAN
200 mutool clean [options] input.pdf [output.pdf] [pages]
201 .PP
202 The clean command pretty prints and rewrites the syntax of a PDF file.
203 It can be used to repair broken files, expand compressed streams, filter
204 out a range of pages, etc.
205 .PP
206 If no output file is specified, it will write the cleaned PDF to "out.pdf"
207 in the current directory.
208 .TP
209 .B \-p password
210 Use the specified password if the file is encrypted.
211 .TP
212 .B \-g
213 Garbage collect objects that have no references from other objects.
214 Give the option twice to also renumber all objects and compact the cross reference table.
215 Give it three times to also merge and reuse duplicate objects.
216 Give it four times to also merge and reuse duplicate streams.
217 .TP
218 .B \-s
219 Rewrite content streams.
220 .TP
221 .B \-l
222 Linearize output. No longer supported! Used to ccreate a "Web Optimized" output file.
223 .TP
224 .B \-D
225 Save file without encryption.
226 .TP
227 .B \-E method
228 Save file with desired encryption method, one of: \fBrc4-40\fR \fBrc4-128\fR \fBaes-128\fR, or \fBaes-256\fR.
229 .TP
230 .B \-O password
231 Owner password used when encrypting output file. This is required to edit the output file.
232 .TP
233 .B \-U password
234 User password used when encrypting output file. This is required to view the output file.
235 .TP
236 .B \-P permissions
237 Permissions used when encrypting output file. These are the permissions that apply when the output file is viewed.
238 .TP
239 .B \-a
240 ASCII Hex encode binary streams. Use in conjunction with -d and -i or -f to
241 ensure that although the images and/or fonts are compressed, the resulting
242 file can still be viewed and edited with a text editor.
243 .TP
244 .B \-d
245 Decompress streams. This will make the output file larger, but provides
246 easy access for reading and editing the contents with a text editor.
247 .TP
248 .B \-z
249 Deflate uncompressed streams.
250 If combined with -d, any decompressed streams will be recompressed.
251 If combined with -a, the streams will also be hex encoded after compression.
252 .TP
253 .B \-e effort
254 Configure how much effort is spent compressing the output file. 0 is default amount, otherwise a percentage of the maximum effort, 1 for minimum and 100 for maximum effort.
255 .TP
256 .B \-f
257 Toggle decompression of font streams. Use in conjunction with -d to leave
258 fonts compressed.
259 .TP
260 .B \-i
261 Toggle decompression of image streams. Use in conjunction with -d to leave
262 images compressed.
263 .TP
264 .B \-c
265 Pretty-print graphics commands in content streams.
266 .TP
267 .B \-s
268 Sanitize graphics commands in content streams, this means, for example, removing invalid or redundant commands.
269 .TP
270 .B \-t
271 Use compact PDF object syntax. This saves space.
272 .TP
273 .B \-tt
274 Use indented PDF object syntax. This is more human-readable.
275 .TP
276 .B \-L
277 Print comments containing labels showing how each object can be reached from the Root.
278 .TP
279 .B \-A
280 Create appearance streams for annotations that are missing appearance streams.
281 .TP
282 .B \-AA
283 Recreate appearance streams for all annotations.
284 .TP
285 .B \-m
286 Preserve metadata.
287 .TP
288 .B \-S
289 Subset fonts if possible. (EXPERIMENTAL!)
290 .TP
291 .B \-Z
292 Use object streams cross reference streams for extra compressoin.
293 .TP
294 .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-subsample-method method
295 Set the subsampling method (\fBaverage\fR, or \fBbicubic\fR) for the
296 desired image types, for example color-lossy and bitonal-loessless.
297 .TP
298 .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-subsample-dpi dpi
299 Set the resolution at which to subsample.
300 .TP
301 .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-recompress-method quality
302 Set the recompression quality to either of \fBnever\fR, \fBsame\fR, \fBlossless\fR, \fBjpeg\fR, \fBj2k\fR, \fBfax\fR, or \fBjbig2\fR.
303 .TP
304 .B \-\-structure=\fR(\fBkeep\fR|\fBdrop\fR)
305 Keep or drop the structure tree.
306 .TP
307 .B pages
308 Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
309 If no pages are specified, then all pages will be included.
310
311 .SH EXTRACT
312 mutool extract [options] file.pdf [object numbers]
313 .PP
314 The extract command can be used to extract images and font files from a PDF.
315 If no object numbers are given on the command line, all images and fonts
316 will be extracted.
317 .TP
318 .B \-p password
319 Use the specified password if the file is encrypted.
320 .TP
321 .B \-r
322 Convert images to RGB when extracting them.
323 .TP
324 .B \-a
325 Embed SMasks as alpha channel..
326 .TP
327 .B \-N
328 Do not use ICC color conversions.
329
330 .SH INFO
331 mutool info [options] file.pdf [pages]
332 .PP
333 The info command lists the resources used on each page in a PDF file.
334 The default is to list all resource types, but if one
335 or more flags are given, only the flagged types will be shown.
336 .TP
337 .B \-p password
338 Use the specified password if the file is encrypted.
339 .TP
340 .B -F
341 List fonts.
342 .TP
343 .B -I
344 List images.
345 .TP
346 .B -M
347 List page dimensions.
348 .TP
349 .B -S
350 List shadings.
351 .TP
352 .B -P
353 List patterns.
354 .TP
355 .B -X
356 List form and postscript XObjects.
357 .TP
358 .B -Z
359 List ZUGFeRD info.
360 .TP
361 .B pages
362 Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
363 If no pages are specified, then all pages will be included.
364
365 .SH CREATE
366 mutool create [-o output.pdf] [options] page1.txt [page2.txt ...]
367 .PP
368 The create command creates a new PDF file with the contents created
369 from one or more input files containing graphics commands.
370 .TP
371 .B \-o output
372 If no output file is specified, it will write the created PDF to "out.pdf"
373 in the current directory.
374 .TP
375 .B page.txt
376 A page is created for each input file, with the contents of the file copied
377 into the content stream. Special comments in the input files are parsed to
378 define the page dimensions and font and image resources:
379 .PP
380 %%MediaBox 0 0 500 800
381 .br
382 %%Rotate 90
383 .br
384 %%Font Tm Times-Roman
385 .br
386 %%Font Fn0 path/to/font/file.ttf
387 .br
388 %%Image Im0 path/to/image.png
389 .TP
390 .B \-O options
391 Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
392
393 .SH PAGES
394 mutool pages [options] input.pdf [pages ...]
395 .PP
396 The pages command dumps information about the size and orientation
397 of pages within the document.
398 .TP
399 .B \-p password
400 Use the specified password if the file is encrypted.
401 .TP
402 .B pages
403 Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
404 If no pages are specified, then all pages will be included.
405
406 .SH POSTER
407 mutool poster [options] input.pdf [output.pdf]
408 .PP
409 The poster command splits each page into tiles, and puts each tile on
410 a page of its own. It's useful for printing a large page onto smaller
411 pieces of paper that can then be glued together to create a large poster.
412 .TP
413 .B \-p password
414 Use the specified password if the file is encrypted.
415 .TP
416 .B \-m margin
417 Margin (overlap) between pages in points or percent.
418 .TP
419 .B \-x factor
420 Split the page into this many horizontal pieces.
421 .TP
422 .B \-y factor
423 Split the page into this many vertical pieces.
424 .TP
425 .B \-r
426 Splits hoirzontally from right to left (default splits from left to right).
427 .PP
428 The output will have x times y number of pages for each input page.
429
430 .SH SHOW
431 mutool show [options] file.pdf [object numbers ...]
432 .PP
433 The show command will print the specified objects and streams to stdout.
434 Streams are decoded and non-printable characters are represented
435 with a period by default.
436 .TP
437 .B \-p password
438 Use the specified password if the file is encrypted.
439 .TP
440 .B \-o file
441 Write output to file instead of stdout.
442 .TP
443 .B \-b
444 Print streams as binary data and omit the object header.
445 .TP
446 .B \-e
447 Print streams in their original encoded (or compressed) form.
448 .TP
449 .B \-g
450 Print each object on a single line, suitable for grep.
451 .TP
452 .B \-r
453 Force repair before showing any objects.
454 .PP
455 Specify objects by number, or use one of the following special names:
456 .TP
457 .B 'xref'
458 Print the cross reference table.
459 .TP
460 .B 'trailer'
461 Print the trailer dictionary.
462 .TP
463 .B 'encrypt'
464 Print the encryption dictionary.
465 .TP
466 .B 'pagetree'
467 List the object numbers for every page.
468 .TP
469 .B 'grep'
470 Print all the objects in the file in a compact one-line format suitable for piping to grep.
471 .TP
472 .B 'outline'
473 Print the outline (table of contents).
474
475 .SH RUN
476 mutool run script.js [arguments]
477 .PP
478 Executes a Javascript program which has access to most of the features of the
479 MuPDF library. The command supports ECMAScript 5 syntax in strict mode. All of
480 the MuPDF constructors and function live in the global object, and the command
481 line arguments are accessible from the global argv object.
482 .PP
483 If invoke without any arguments, it will drop you into an interactive REPL
484 (read-eval-print-loop). On the interactive prompt, if you prefix a line with an
485 equal character it will automatically print the results of the line.
486 .PP
487 See the MuPDF documentation for details about the Javascript interfaces.
488
489 .SH CONVERT
490 mutool convert [options] file [pages]
491 .PP
492 The convert command is used to convert a file from one format to another.
493 .TP
494 .B \-p password
495 Use the specified password if the file is encrypted.
496 .TP
497 .B \-b box
498 Use name page box (`MediaBox`, `CropBox`, `BleedBox`, `TrimBox`, or `ArtBox`), see :ref:`defined boxes<mutool_trim_defined_boxes>`.
499 .TP
500 .B \-A bits
501 Specify how many bits of anti-aliasing to use. The default is 8.
502 .TP
503 .B \-W width
504 Page width in points for EPUB layout.
505 .TP
506 .B \-H height
507 Page height in points for EPUB layout.
508 .TP
509 .B \-S size
510 Font size in points for EPUB layout.
511 .TP
512 .B \-U filename
513 User CSS stylesheet for EPUB layout.
514 .TP
515 .B \-o output
516 The output format is inferred from the output filename.
517 Embed %d in the name to indicate the page number (for example: "page%d.png").
518 Printf modifiers are supported, for example "%03d".
519 If no output is specified, the output will go to stdout.
520 .TP
521 .B \-F format
522 Enforce a specific output format. Only necessary when outputting to stdout
523 since normally the output filename is used to infer the output format.
524 .TP
525 .B \-O options
526 Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
527
528 .SH MERGE
529 mutool merge [options] file1 [pages] file2 [pages] ...
530 .PP
531 The merge command is used to pick out pages from two or more files and merge
532 them in order into a new PDF output file.
533 .TP
534 .B \-o output
535 The output filename.
536 .TP
537 .B \-O options
538 Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
539
540 .SH BAKE
541 mutool bake [options] input.pdf [output.pdf]
542 .PP
543 Normally annotations and form field widgets are separate content streams
544 that get drawn on top of the page contents. This command bakes annotations
545 and/or widgets into the page contents, making them inseparable.
546 After baking in annotations and widgets they are just visual representaitons
547 of what the original annotation/widget looked like, their properties can no
548 longer be edited since they no longer exist as proper annotation/widgets.
549 .TP
550 .B \-A
551 Do not bake in annotations.
552 .TP
553 .B \-F
554 Do not bake in form field widgets.
555 .TP
556 .B \-O options
557 A comma separated list of PDF options. See \fIOUTPUT OPTIONS\fR below.
558
559 .SH RECOLOR
560 mutool recolor [options] input.pdf
561 .PP
562 Change the color space used in a PDF to a desired one. This command can,
563 for example, change a color PDF to be grayscale.
564 .TP
565 .B \-c colorspace
566 Desired output colorspace, choose one of \fBgray\fR (default), \fBrgb\fR, or \fBcmyk\fR.
567 .TP
568 .B \-r
569 Remove any output intents.
570 .TP
571 .B \-o filename
572 The output filename.
573
574 .SH TRACE
575 mutool trace [options] file1 [pages] file2 [pages] ...
576 .PP
577 Prints a trace of device calls needed to render the desired pages from the given document.
578 .TP
579 .B \-p password
580 Use the specified password if the file is encrypted.
581 .TP
582 .B \-W width
583 Page width in points for EPUB layout.
584 .TP
585 .B \-H height
586 Page height in points for EPUB layout.
587 .TP
588 .B \-S size
589 Font size in points for EPUB layout.
590 .TP
591 .B \-U filename
592 User CSS stylesheet for EPUB layout.
593 .TP
594 .B \-X
595 Disable document styles for EPUB layout.
596 .TP
597 .B \-d
598 Enable use of display lists.
599 .B pages
600 Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
601 If no pages are specified, then all pages will be rendered.
602
603 .SH TRIM
604 mutool trim [options] input.pdf
605 .PP
606 Makes a modified version of a PDF with content that falls inside (or outside) of the given box removed.
607 .TP
608 .B \-b box
609 Which box to trim to, either one of: \fBMediaBox\fR (default) \fBCropBox\fR \fBBleedBox\fR \fBTrimBox\fR, or \fBArtBox\fR.
610 .TP
611 .B \-f
612 Fallback to mediabox if specified box not available.
613 .TP
614 .B \-m all
615 Add same margins to all sides of the box, where \fBall\fR is positive for inwards, negative for outwards.
616 .TP
617 .B \-m vertical,horizontal
618 Add specific margins for vertical and horizontal sides of the box, where \fBvertical\fR and \fBhorizonal\fR are positive for inwards, negative for outwards.
619 .TP
620 .B \-m top,right,bottom,left
621 Add specific margins for top, right, bottom and left sides of the box, where \fBtop\fR, \fBright\fR, \fBbottom\fR, and \fBleft\fR each are positive for inwards, negative for outwards.
622 .TP
623 .B \-e
624 Exclude contents of box rather than include them.
625 .TP
626 .B \-o filename
627 The output filename.
628
629 .SH SIGN
630 mutool sign [options] input.pdf [signature object number]
631 .PP
632 Reads a PDF file and prints infromation about each signature field object. With
633 suitable options all or specified signatures can be verified, cleared or signed.
634 .TP
635 .B \-p password
636 Use the specified password if the file is encrypted.
637 .TP
638 .B \-v
639 Verify all signatures, or only the specified signature.
640 .TP
641 .B \-c
642 Clear all signatures, or only the specified signature.
643 .TP
644 .B \-s certificate-filename
645 Read a certificate from the given filename and use it to sign all, or just the specified signature.
646 .TP
647 .B \-P certificate-password
648 Use the specified password when opening the certificate.
649 .TP
650 .B \-o filename
651 The output filename.
652 .B signature object numbers
653 A list of PDF object number for signatures to verify/clear/sign. If no such object numbers are given, all signatures will be
654 processed.
655
656 .SH AUDIT
657 mutool audit [options] file1.pdf file2.pdf ...
658 .PP
659 Outputs a report of operator and space usage for each given PDF file.
660 .TP
661 .B -o filename
662 The output filename for the report.
663
664 .SH OUTPUT OPTIONS
665 Configuring output is done by a comma separated list of output options.
666
667 .TP
668 .B Raster format options
669 These apply to output formats: cbz, png, pnm, pgm, ppm, pam, pbm, pkm.
670 .IP
671 .B rotate=N
672 .in +4n
673 Rotate rendered pagess N degrees counterclockwise.
674 .in
675 .IP
676 .B resoution=N
677 .in +4n
678 Set both X and Y resolution in pixels per inch.
679 .in
680 .IP
681 .B x-resolution=N
682 .in +4n
683 Set X resolution of rendred pages in pixels per inch.
684 .in
685 .IP
686 .B y-resolution=N
687 .in +4n
688 Set Y resolution of rendred pages in pixels per inch.
689 .in
690 .IP
691 .B width=N
692 .in +4n
693 Render pages to fit N pixels wide (ignore resolution option).
694 .in
695 .IP
696 .B height=N
697 .in +4n
698 Render pages to fit N pixels tall (ignore resolution option).
699 .in
700 .IP
701 .B colorspace=\fR(\fBgray\fR|\fBrgb\fR|\fBcmyk\fR)
702 .in +4n
703 Render pages using the specified colorspace.
704 .in
705 .IP
706 .B alpha
707 Render pages with alpha channel and transparent background.
708 .in
709 .IP
710 .B graphics=\fR(\fBaaN\fR|\fBcop\fR|\fBapp\fR)
711 .br
712 .B text=\fR(\fBaaN\fR|\fBcop\fR|\fBapp\fR)
713 .in +4n
714 Set the rasterizer to use for graphics or text respectively:
715 .in +4n
716 .B aaN
717 .in +4n
718 Antialias with N bits (0 to 8).
719 .in
720 .B cop
721 .in +4n
722 Center of pixel.
723 .in
724 .B app
725 .in +4n
726 Any part of pixel.
727 .in -12n
728
729 .TP
730 .B PDF options
731 .IP
732 .B decompress
733 .in +4n
734 Decompress all streams (except compress-fonts/images).
735 .in
736 .IP
737 .B compress=\fR(\fByes\fR|\fBflate\fR|\fBbrotli\fR)
738 .in +4n
739 Compress all streams, if no value is given, or the value is \fByesf\R the default is to use flate.
740 .in
741 .IP
742 .B compress-fonts
743 .in +4n
744 Compress object stream for embedded fonts.
745 .in
746 .IP
747 .B compress-images
748 .in +4n
749 Compress object streams for images.
750 .in
751 .IP
752 .B compress-effort=\fR(\fB0\fR|\fBPERCENTAGE\fR)
753 .in +4n
754 Effort spent compressing, 0 is default, otherwise percentage of max effort.
755 .in
756 .IP
757 .B ascii
758 .in +4n
759 Encode object streams using ASCII hex encoding.
760 .in
761 .IP
762 .B pretty
763 .in +4n
764 Pretty-print objects with indentation.
765 .in
766 .IP
767 .B labels
768 .in +4n
769 Print object labels.
770 .in
771 .IP
772 .B linearize
773 .in +4n
774 Optimize document for progressive loading in viewers ( no longer supported!).
775 .in
776 .IP
777 .B clean
778 .in +4n
779 Pretty-print graphics commands in content streams.
780 .in
781 .IP
782 .B sanitize
783 .in +4n
784 Clean up graphics command in content streams.
785 .in
786 .IP
787 .B garbage
788 .in +4n
789 Garbage collect unused objects.
790 .in
791 .IP
792 .B garbage=compact
793 .in +4n
794 Garbage collect unused object, and compact cross reference table.
795 .in
796 .IP
797 .B garbage=deduplicate
798 .in +4n
799 Garbage collect unused objects, compact cross reference table, and recombine duplicate objects.
800 .in
801 .IP
802 .B incremental
803 .in +4n
804 Write changes as incremental update.
805 .in
806 .IP
807 .B objstms
808 .in +4n
809 Use object streams and cross reference streams.
810 .in
811 .IP
812 .B appearance=\fR(\fByes\fR|\fBall\fR)
813 .in +4n
814 Synthesize just missing, or all, annotation/widget apperance streams.
815 .in
816 .IP
817 .B continue-on-error
818 .in +4n
819 Continue saving the document even if there is an error.
820 .in
821 .IP
822 .B decrypt
823 .in +4n
824 Write unencrypted document.
825 .in
826 .IP
827 .B encrypt=\fR(\fBnone\fR|\fBkeep\fR|\fBrc4-40\fR|\fBrc4-128\fR|\fBaes-128\fR|\fBaes-256\fR)
828 .in +4n
829 Write encrypted document using specified encryption method.
830 .in
831 .IP
832 .B permissions=NUMBER
833 .in +4n
834 Document permissions to grant when encrypting.
835 .in
836 .IP
837 .B user-password=PASSWORD
838 .in +4n
839 Password required to read document.
840 .in
841 .IP
842 .B owner-password=PASSWORD
843 .in +4n
844 Password required to edit document.
845 .in
846 .IP
847 .B regenerate-id=no
848 .in +4n
849 Regenerate document id (default yes).
850 .in
851
852 .TP
853 .B Text format options
854 These apply to formats: html, xhtml, text stext.
855 .IP
856 .B preserve-images
857 .in +4n
858 Keep imagess in output.
859 .in
860 .IP
861 .B preserve-ligatures
862 .in +4n
863 Do not expand ligature into constituent characters.
864 .in
865 .IP
866 .B preserve-spans
867 .in +4n
868 Do not merge spans on the same line.
869 .in
870 .IP
871 .B preserve-whitespace
872 .in +4n
873 Do not convert all whitespace into space characters.
874 .in
875 .IP
876 .B inhibit-spaces
877 .in +4n
878 Do not add spaces between gaps in the text.
879 .in
880 .IP
881 .B paragraph-break
882 .in +4n
883 Break blocks at paragraph boundaries.
884 .in
885 .IP
886 .B dehyphenate
887 .in +4n
888 Attempts to join up hyphenated words.
889 .in
890 .IP
891 .B ignore-actualtext
892 .in +4n
893 Do not apply ActualText replacements.
894 .in
895 .IP
896 .B use-cid-for-unknown-unicode
897 .in +4n
898 Use character code if unicode mapping fails.
899 .in
900 .IP
901 .B use-gid-for-unknown-unicode
902 .in +4n
903 Use glyph index if unicode mapping fails.
904 .in
905 .IP
906 .B accurate-bboxes
907 .in +4n
908 Calculate bboxes from the outlines.
909 .in
910 .IP
911 .B accurate-ascenders
912 .in +4n
913 Calculate ascender/descender from font glyphs.
914 .in
915 .IP
916 .B accurate-side-bearings
917 .in +4n
918 Expand character bboxes to completely include width of glyphs.
919 .in
920 .IP
921 .B collect-styles
922 .in +4n
923 Attempt to detect text features (fake bold, strikeout, underlined, etc.)
924 .in
925 .IP
926 .B clip
927 .in +4n
928 Do not include text that is completely clipped.
929 .in
930 .IP
931 .B clip-rect=x0:y0:x1:y1
932 .in +4n
933 Specify clipping rectangle within which to collect content.
934 .in
935 .IP
936 .B structured
937 .in +4n
938 Collect structure markup.
939 .in
940 .IP
941 .B vectors
942 .in +4n
943 Include vector bboxes in output.
944 .in
945 .IP
946 .B segment
947 .in +4n
948 Attempt to segment the page.
949 .in
950 .IP
951 .B table-hunt
952 .in +4n
953 Hunt for tables within a (segmented) page.
954 .in
955
956 .TP
957 .B PCL options
958 .IP
959 .B colorspace=\fR(\fBmono\fR|\fBrgb\fR)
960 .in +4n
961 Render 1-bit black and white or a full color page.
962 .in
963 .IP
964 .B preset=\fR(\fBgeneric\fR|\fBljet4\fR|\fBdj500\fR|\fBfs600\fR|\fBlj\fR|\fBlj2\fR|\fBlj3\fR|\fBlj4\fR|\fBlj4pl\fR|\fBlj4d\fR|\fBlp2563b\fR|\fBoce9050\fR)
965 .in +4n
966 Render 1-bit black and white or a full color page.
967 .in
968 .IP
969 .B spacing=\fR(\fB0\fR|\fB1\fR|\fB2\fR|\fB3\fR)
970 .in +4n
971 Set vertical spacing to none, PCL 3 (<ESC>*p+<n>Y), PCL 5 (<ESC>*b<n>Y), or PCL 6 (<ESC>*b<n>Y and clear seed row).
972 .in
973 .IP
974 .B mode2
975 .in +4n
976 Enable mode 2 graphics compression.
977 .in
978 .IP
979 .B mode3
980 .in +4n
981 Enable mode 3 graphics compression.
982 .in
983 .IP
984 .B eog_reset
985 .in +4n
986 End of graphics (<ESC>+rB) resets all parameters.
987 .in
988 .IP
989 .B has_duplex
990 .in +4n
991 Duplex supported (<ESC>&l<duplex>S).
992 .in
993 .IP
994 .B has_papersize
995 .in +4n
996 Papersize setting supported (<ESC>&l<sizecode>A).
997 .in
998 .IP
999 .B has_copies
1000 .in +4n
1001 Number of copies supported (<ESC>&l<copies>X).
1002 .in
1003 .IP
1004 .B is_ljet4pjl
1005 .in +4n
1006 Disable/enable HP 4PJL model-specific output.
1007 .in
1008 .IP
1009 .B is_oce9050
1010 .in +4n
1011 Disable/enable Oce 9050 models-specific output.
1012 .in
1013
1014 .TP
1015 .B PCLm options
1016 .IP
1017 .B compression=\fR(\fBnone\fR|\fBflate\fR)
1018 .in +4n
1019 No compression (default), or enable flate compression.
1020 .in
1021 .IP
1022 .B strip-height=N
1023 .in +4n
1024 Strip height (default 16).
1025 .in
1026
1027 .TP
1028 .B PWG options
1029 .IP
1030 .B media_class=<string>
1031 .in +4n
1032 Set the media_class field.
1033 .in
1034 .IP
1035 .B media_color=<string>
1036 .in +4n
1037 Set the media_color field.
1038 .in
1039 .IP
1040 .B media_type=<string>
1041 .in +4n
1042 Set the media_type field.
1043 .in
1044 .IP
1045 .B output_type=<string>
1046 .in +4n
1047 Set the output_type field.
1048 .in
1049 .IP
1050 .B rendering_intent=<string>
1051 .in +4n
1052 Set the rendering_intent field.
1053 .in
1054 .IP
1055 .B page_size_name=<string>
1056 .in +4n
1057 Set the page_size_name field.
1058 .in
1059 .IP
1060 .B advance_distance=<int>
1061 .in +4n
1062 Set the advance_distance field.
1063 .in
1064 .IP
1065 .B advance_media=<int>
1066 .in +4n
1067 Set the advance_media field.
1068 .in
1069 .IP
1070 .B collate=<int>
1071 .in +4n
1072 Set the collate field.
1073 .in
1074 .IP
1075 .B cut_media=<int>
1076 .in +4n
1077 Set the cut_media field.
1078 .in
1079 .IP
1080 .B duplex=<int>
1081 .in +4n
1082 Set the duplex field.
1083 .in
1084 .IP
1085 .B insert_sheet=<int>
1086 .in +4n
1087 Set the insert_sheet field.
1088 .in
1089 .IP
1090 .B jog=<int>
1091 .in +4n
1092 Set the jog field.
1093 .in
1094 .IP
1095 .B leading_edge=<int>
1096 .in +4n
1097 Set the leading_edge field.
1098 .in
1099 .IP
1100 .B manual_feed=<int>
1101 .in +4n
1102 Set the manual_feed field.
1103 .in
1104 .IP
1105 .B media_position=<int>
1106 .in +4n
1107 Set the media_position field.
1108 .in
1109 .IP
1110 .B media_weight=<int>
1111 .in +4n
1112 Set the media_weight field.
1113 .in
1114 .IP
1115 .B mirror_print=<int>
1116 .in +4n
1117 Set the mirror_print field.
1118 .in
1119 .IP
1120 .B negative_print=<int>
1121 .in +4n
1122 Set the negative_print field.
1123 .in
1124 .IP
1125 .B num_copies=<int>
1126 .in +4n
1127 Set the num_copies field.
1128 .in
1129 .IP
1130 .B orientation=<int>
1131 .in +4n
1132 Set the orientation field.
1133 .in
1134 .IP
1135 .B output_face_up=<int>
1136 .in +4n
1137 Set the output_face_up field.
1138 .in
1139 .IP
1140 .B page_size_x=<int>
1141 .in +4n
1142 Set the page_size_x field.
1143 .in
1144 .IP
1145 .B page_size_y=<int>
1146 .in +4n
1147 Set the page_size_y field.
1148 .in
1149 .IP
1150 .B separations=<int>
1151 .in +4n
1152 Set the separations field.
1153 .in
1154 .IP
1155 .B tray_switch=<int>
1156 .in +4n
1157 Set the tray_switch field.
1158 .in
1159 .IP
1160 .B tumble=<int>
1161 .in +4n
1162 Set the tumble field.
1163 .in
1164 .IP
1165 .B media_type_num=<int>
1166 .in +4n
1167 Set the media_type_num field.
1168 .in
1169 .IP
1170 .B compression=<int>
1171 .in +4n
1172 Set the compression field.
1173 .in
1174 .IP
1175 .B row_count=<int>
1176 .in +4n
1177 Set the row_count field.
1178 .in
1179 .IP
1180 .B row_feed=<int>
1181 .in +4n
1182 Set the row_feed field.
1183 .in
1184 .IP
1185 .B row_step=<int>
1186 .in +4n
1187 Set the row_step field.
1188 .in
1189
1190 .TP
1191 .B SVG options
1192 .IP
1193 .B text=text
1194 .in +4n
1195 Emit text as <text> elements (inaccurate fonts).
1196 .in
1197 .IP
1198 .B text=path
1199 .in +4n
1200 Emit text as <path> elements (accurate fonts).
1201 .in
1202 .IP
1203 .B no-reuse-images
1204 .in +4n
1205 Do not reuse image using <symbol> definitions.
1206 .in -4n
1207
1208 .SH EXIT STATUS
1209 The exit status is 0 upon successful execution and non-zero upon error.
1210
1211 .SH SEE ALSO
1212 .BR mupdf (1),
1213
1214 .SH AUTHOR
1215 MuPDF is Copyright 2004-2025 Artifex Software, Inc.