| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215 |
- .TH "MUTOOL" "1" "April 14, 2025"
- .\" Please adjust this date whenever revising the manpage.
- .\" no hyphenation
- .nh
- .\" adjust left
- .ad l
- .SH NAME
- mutool \- all purpose tool for dealing with PDF files
- .SH SYNOPSIS
- mutool <sub-command> [options]
- .SH VERSION
- mutool -v
- .PP
- Shows the MuPDF version used to build mutool.
- .SH DESCRIPTION
- mutool is a tool based on MuPDF for dealing with document files in various manners.
- There are several sub commands available, as described below.
- .SH DRAW
- mutool draw [options] file [pages]
- .PP
- The draw command will render a document to image files,
- convert to another vector format, or extract the text content.
- .PP
- The supported input document formats are: pdf, xps, cbz, and epub.
- .PP
- The supported output image formats are: pbm, pgm, ppm, pam, png, pwg, pcl and ps.
- The supported output vector formats are: svg, pdf, and debug trace (as xml).
- The supported output text formats are: plain text, html, and structured text (as xml).
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-o output
- The output format is inferred from the output filename.
- Embed %d in the name to indicate the page number (for example: "page%d.png").
- Printf modifiers are supported, for example "%03d".
- If no output is specified, the output will go to stdout.
- .TP
- .B \-F format
- Enforce a specific output format. Only necessary when outputting to stdout
- since normally the output filename is used to infer the output format.
- .TP
- .B \-q
- Be quiet, do not print progress messages.
- .TP
- .B \-R angle
- Rotate clockwise by given number of degrees.
- .TP
- .B \-r resolution
- Render the page at the specified resolution.
- The default resolution is 72 dpi.
- .TP
- .B \-w width
- Render the page at the specified width (or, if the -r flag is used,
- render with a maximum width).
- .TP
- .B \-h height
- Render the page at the specified height (or, if the -r flag is used,
- render with a maximum height).
- .TP
- .B \-f
- Fit exactly; ignore the aspect ratio when matching specified width/heights.
- .TP
- .B \-b box
- Use name page box (`MediaBox`, `CropBox`, `BleedBox`, `TrimBox`, or `ArtBox`), see :ref:`defined boxes<mutool_trim_defined_boxes>`.
- .TP
- .B \-B bandheight
- Render in banded mode with each band no taller than the given height. This uses
- less memory during rendering. Only compatible with pam, pgm, ppm, pnm and png
- output formats. Banded rendering and md5 checksumming may not be used at the
- same time.
- .TP
- .B \-T threads
- Number of threads to use for rendering (banded mode only).
- .TP
- .B \-W width
- Page width in points for EPUB layout.
- .TP
- .B \-H height
- Page height in points for EPUB layout.
- .TP
- .B \-S size
- Font size in points for EPUB layout.
- .TP
- .B \-U filename
- User CSS stylesheet for EPUB layout.
- .TP
- .B \-X
- Disable document styles for EPUB layout.
- .TP
- .B \-a
- Disable usage of accelerator file.
- .TP
- .B \-c colorspace
- Render in the specified colorspace.
- Supported colorspaces are: \fBmono\fR, \fBgray\fR, \fBgrayalpha\fR, \fBrgb\fR, \fBrgbalpha\fR, \fBcmyk\fR, \fBcmykalpha\fR.
- Some abbreviations are allowed: \fBm\fR, \fBg\fR, \fBga\fR, \fBrgba\fR, \fBcmyka\fR.
- The default is chosen based on the output format.
- .TP
- .B \-e filename
- Proof ICC profile filename to use for rendering.
- .TP
- .B -G gamma
- Apply gamma correction.
- Some typical values are 0.7 or 1.4 to thin or darken text rendering.
- .TP
- .B -I
- Invert colors.
- .TP
- .B \-s [mft5]
- Show various bits of information:
- .B m
- for glyph cache and total memory usage,
- .B f
- for page features such as whether the page is grayscale or color,
- .B t
- for per page rendering times as well statistics, and
- .B 5
- for md5 checksums of rendered images that can be used to check if rendering has
- changed.
- .TP
- .B \-A bits
- Specify how many bits of anti-aliasing to use. The default is 8.
- .TP
- .B \-A bits/bits
- 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.
- .TP
- .B \-l width
- Minimum stroked line width (in pixels).
- .TP
- .B \-K
- Do not draw text.
- .TP
- .B \-KK
- Only draw text.
- .TP
- .B \-D
- Disable use of display lists. May cause slowdowns, but should reduce
- the amount of memory used.
- .TP
- .B \-i
- Ignore errors.
- .TP
- .B \-m limit
- Limit memory usage in bytes.
- .TP
- .B \-L
- Low memory mode (avoid caching objects by clearing cache after each page).
- .TP
- .B \-P
- Run interpretation and rendering at the same time.
- .TP
- .B \-N
- Disable ICC workflow.
- .TP
- .B \-O overprint
- Control spot/overprint rendering: \fB0\fR for no spot rendering, \fB1\fR for Overprint simulation (default), or \fB2f\R for full spot rendering.
- .TP
- .B \-t language
- Specify language/script for OCR (default: eng)
- .TP
- .B \-d ocr-file-path
- Specify path for OCR files (default: rely on \fBTESSDATA_PREFIX\fR environment variable.
- .TP
- .B \-k correction
- 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.
- .TP
- .B \-k correction,angle
- Set the skew correction as well as the angle.
- .TP
- .B \-y l
- Print the layer configs to stderr.
- .TP
- .B \-y layer-number
- Select layer config (by number from \fB-y l\fR).
- .TP
- .B \-y layer-number,item1,item2,...
- Select layer config (by number from \fB-y l\fR) and toggle the listed items.
- .TP
- .B \-Y
- Print the individual layers to stderr.
- .TP
- .B \-z layer-number
- Hide individual layer.
- .TP
- .B \-Z layer-number
- Show individual layer.
- .TP
- .B pages
- Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
- If no pages are specified, then all pages will be rendered.
- .SH CLEAN
- mutool clean [options] input.pdf [output.pdf] [pages]
- .PP
- The clean command pretty prints and rewrites the syntax of a PDF file.
- It can be used to repair broken files, expand compressed streams, filter
- out a range of pages, etc.
- .PP
- If no output file is specified, it will write the cleaned PDF to "out.pdf"
- in the current directory.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-g
- Garbage collect objects that have no references from other objects.
- Give the option twice to also renumber all objects and compact the cross reference table.
- Give it three times to also merge and reuse duplicate objects.
- Give it four times to also merge and reuse duplicate streams.
- .TP
- .B \-s
- Rewrite content streams.
- .TP
- .B \-l
- Linearize output. No longer supported! Used to ccreate a "Web Optimized" output file.
- .TP
- .B \-D
- Save file without encryption.
- .TP
- .B \-E method
- Save file with desired encryption method, one of: \fBrc4-40\fR \fBrc4-128\fR \fBaes-128\fR, or \fBaes-256\fR.
- .TP
- .B \-O password
- Owner password used when encrypting output file. This is required to edit the output file.
- .TP
- .B \-U password
- User password used when encrypting output file. This is required to view the output file.
- .TP
- .B \-P permissions
- Permissions used when encrypting output file. These are the permissions that apply when the output file is viewed.
- .TP
- .B \-a
- ASCII Hex encode binary streams. Use in conjunction with -d and -i or -f to
- ensure that although the images and/or fonts are compressed, the resulting
- file can still be viewed and edited with a text editor.
- .TP
- .B \-d
- Decompress streams. This will make the output file larger, but provides
- easy access for reading and editing the contents with a text editor.
- .TP
- .B \-z
- Deflate uncompressed streams.
- If combined with -d, any decompressed streams will be recompressed.
- If combined with -a, the streams will also be hex encoded after compression.
- .TP
- .B \-e effort
- 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.
- .TP
- .B \-f
- Toggle decompression of font streams. Use in conjunction with -d to leave
- fonts compressed.
- .TP
- .B \-i
- Toggle decompression of image streams. Use in conjunction with -d to leave
- images compressed.
- .TP
- .B \-c
- Pretty-print graphics commands in content streams.
- .TP
- .B \-s
- Sanitize graphics commands in content streams, this means, for example, removing invalid or redundant commands.
- .TP
- .B \-t
- Use compact PDF object syntax. This saves space.
- .TP
- .B \-tt
- Use indented PDF object syntax. This is more human-readable.
- .TP
- .B \-L
- Print comments containing labels showing how each object can be reached from the Root.
- .TP
- .B \-A
- Create appearance streams for annotations that are missing appearance streams.
- .TP
- .B \-AA
- Recreate appearance streams for all annotations.
- .TP
- .B \-m
- Preserve metadata.
- .TP
- .B \-S
- Subset fonts if possible. (EXPERIMENTAL!)
- .TP
- .B \-Z
- Use object streams cross reference streams for extra compressoin.
- .TP
- .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-subsample-method method
- Set the subsampling method (\fBaverage\fR, or \fBbicubic\fR) for the
- desired image types, for example color-lossy and bitonal-loessless.
- .TP
- .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-subsample-dpi dpi
- Set the resolution at which to subsample.
- .TP
- .B \-\-\fR(\fBcolor\fR,\fBgray\fR,\fBbitonal\fR)\fB-\fR(,\fBlossy-\fR,\fBlossless-\fR)\fBimage-recompress-method quality
- Set the recompression quality to either of \fBnever\fR, \fBsame\fR, \fBlossless\fR, \fBjpeg\fR, \fBj2k\fR, \fBfax\fR, or \fBjbig2\fR.
- .TP
- .B \-\-structure=\fR(\fBkeep\fR|\fBdrop\fR)
- Keep or drop the structure tree.
- .TP
- .B pages
- Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
- If no pages are specified, then all pages will be included.
- .SH EXTRACT
- mutool extract [options] file.pdf [object numbers]
- .PP
- The extract command can be used to extract images and font files from a PDF.
- If no object numbers are given on the command line, all images and fonts
- will be extracted.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-r
- Convert images to RGB when extracting them.
- .TP
- .B \-a
- Embed SMasks as alpha channel..
- .TP
- .B \-N
- Do not use ICC color conversions.
- .SH INFO
- mutool info [options] file.pdf [pages]
- .PP
- The info command lists the resources used on each page in a PDF file.
- The default is to list all resource types, but if one
- or more flags are given, only the flagged types will be shown.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B -F
- List fonts.
- .TP
- .B -I
- List images.
- .TP
- .B -M
- List page dimensions.
- .TP
- .B -S
- List shadings.
- .TP
- .B -P
- List patterns.
- .TP
- .B -X
- List form and postscript XObjects.
- .TP
- .B -Z
- List ZUGFeRD info.
- .TP
- .B pages
- Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
- If no pages are specified, then all pages will be included.
- .SH CREATE
- mutool create [-o output.pdf] [options] page1.txt [page2.txt ...]
- .PP
- The create command creates a new PDF file with the contents created
- from one or more input files containing graphics commands.
- .TP
- .B \-o output
- If no output file is specified, it will write the created PDF to "out.pdf"
- in the current directory.
- .TP
- .B page.txt
- A page is created for each input file, with the contents of the file copied
- into the content stream. Special comments in the input files are parsed to
- define the page dimensions and font and image resources:
- .PP
- %%MediaBox 0 0 500 800
- .br
- %%Rotate 90
- .br
- %%Font Tm Times-Roman
- .br
- %%Font Fn0 path/to/font/file.ttf
- .br
- %%Image Im0 path/to/image.png
- .TP
- .B \-O options
- Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
- .SH PAGES
- mutool pages [options] input.pdf [pages ...]
- .PP
- The pages command dumps information about the size and orientation
- of pages within the document.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B pages
- Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
- If no pages are specified, then all pages will be included.
- .SH POSTER
- mutool poster [options] input.pdf [output.pdf]
- .PP
- The poster command splits each page into tiles, and puts each tile on
- a page of its own. It's useful for printing a large page onto smaller
- pieces of paper that can then be glued together to create a large poster.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-m margin
- Margin (overlap) between pages in points or percent.
- .TP
- .B \-x factor
- Split the page into this many horizontal pieces.
- .TP
- .B \-y factor
- Split the page into this many vertical pieces.
- .TP
- .B \-r
- Splits hoirzontally from right to left (default splits from left to right).
- .PP
- The output will have x times y number of pages for each input page.
- .SH SHOW
- mutool show [options] file.pdf [object numbers ...]
- .PP
- The show command will print the specified objects and streams to stdout.
- Streams are decoded and non-printable characters are represented
- with a period by default.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-o file
- Write output to file instead of stdout.
- .TP
- .B \-b
- Print streams as binary data and omit the object header.
- .TP
- .B \-e
- Print streams in their original encoded (or compressed) form.
- .TP
- .B \-g
- Print each object on a single line, suitable for grep.
- .TP
- .B \-r
- Force repair before showing any objects.
- .PP
- Specify objects by number, or use one of the following special names:
- .TP
- .B 'xref'
- Print the cross reference table.
- .TP
- .B 'trailer'
- Print the trailer dictionary.
- .TP
- .B 'encrypt'
- Print the encryption dictionary.
- .TP
- .B 'pagetree'
- List the object numbers for every page.
- .TP
- .B 'grep'
- Print all the objects in the file in a compact one-line format suitable for piping to grep.
- .TP
- .B 'outline'
- Print the outline (table of contents).
- .SH RUN
- mutool run script.js [arguments]
- .PP
- Executes a Javascript program which has access to most of the features of the
- MuPDF library. The command supports ECMAScript 5 syntax in strict mode. All of
- the MuPDF constructors and function live in the global object, and the command
- line arguments are accessible from the global argv object.
- .PP
- If invoke without any arguments, it will drop you into an interactive REPL
- (read-eval-print-loop). On the interactive prompt, if you prefix a line with an
- equal character it will automatically print the results of the line.
- .PP
- See the MuPDF documentation for details about the Javascript interfaces.
- .SH CONVERT
- mutool convert [options] file [pages]
- .PP
- The convert command is used to convert a file from one format to another.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-b box
- Use name page box (`MediaBox`, `CropBox`, `BleedBox`, `TrimBox`, or `ArtBox`), see :ref:`defined boxes<mutool_trim_defined_boxes>`.
- .TP
- .B \-A bits
- Specify how many bits of anti-aliasing to use. The default is 8.
- .TP
- .B \-W width
- Page width in points for EPUB layout.
- .TP
- .B \-H height
- Page height in points for EPUB layout.
- .TP
- .B \-S size
- Font size in points for EPUB layout.
- .TP
- .B \-U filename
- User CSS stylesheet for EPUB layout.
- .TP
- .B \-o output
- The output format is inferred from the output filename.
- Embed %d in the name to indicate the page number (for example: "page%d.png").
- Printf modifiers are supported, for example "%03d".
- If no output is specified, the output will go to stdout.
- .TP
- .B \-F format
- Enforce a specific output format. Only necessary when outputting to stdout
- since normally the output filename is used to infer the output format.
- .TP
- .B \-O options
- Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
- .SH MERGE
- mutool merge [options] file1 [pages] file2 [pages] ...
- .PP
- The merge command is used to pick out pages from two or more files and merge
- them in order into a new PDF output file.
- .TP
- .B \-o output
- The output filename.
- .TP
- .B \-O options
- Comma separated list of format specific output options, see \fIOUTPUT OPTIONS\fR below.
- .SH BAKE
- mutool bake [options] input.pdf [output.pdf]
- .PP
- Normally annotations and form field widgets are separate content streams
- that get drawn on top of the page contents. This command bakes annotations
- and/or widgets into the page contents, making them inseparable.
- After baking in annotations and widgets they are just visual representaitons
- of what the original annotation/widget looked like, their properties can no
- longer be edited since they no longer exist as proper annotation/widgets.
- .TP
- .B \-A
- Do not bake in annotations.
- .TP
- .B \-F
- Do not bake in form field widgets.
- .TP
- .B \-O options
- A comma separated list of PDF options. See \fIOUTPUT OPTIONS\fR below.
- .SH RECOLOR
- mutool recolor [options] input.pdf
- .PP
- Change the color space used in a PDF to a desired one. This command can,
- for example, change a color PDF to be grayscale.
- .TP
- .B \-c colorspace
- Desired output colorspace, choose one of \fBgray\fR (default), \fBrgb\fR, or \fBcmyk\fR.
- .TP
- .B \-r
- Remove any output intents.
- .TP
- .B \-o filename
- The output filename.
- .SH TRACE
- mutool trace [options] file1 [pages] file2 [pages] ...
- .PP
- Prints a trace of device calls needed to render the desired pages from the given document.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-W width
- Page width in points for EPUB layout.
- .TP
- .B \-H height
- Page height in points for EPUB layout.
- .TP
- .B \-S size
- Font size in points for EPUB layout.
- .TP
- .B \-U filename
- User CSS stylesheet for EPUB layout.
- .TP
- .B \-X
- Disable document styles for EPUB layout.
- .TP
- .B \-d
- Enable use of display lists.
- .B pages
- Comma separated list of page numbers and ranges (for example: 1,5,10-15,20-N), where the character N denotes the last page.
- If no pages are specified, then all pages will be rendered.
- .SH TRIM
- mutool trim [options] input.pdf
- .PP
- Makes a modified version of a PDF with content that falls inside (or outside) of the given box removed.
- .TP
- .B \-b box
- Which box to trim to, either one of: \fBMediaBox\fR (default) \fBCropBox\fR \fBBleedBox\fR \fBTrimBox\fR, or \fBArtBox\fR.
- .TP
- .B \-f
- Fallback to mediabox if specified box not available.
- .TP
- .B \-m all
- Add same margins to all sides of the box, where \fBall\fR is positive for inwards, negative for outwards.
- .TP
- .B \-m vertical,horizontal
- Add specific margins for vertical and horizontal sides of the box, where \fBvertical\fR and \fBhorizonal\fR are positive for inwards, negative for outwards.
- .TP
- .B \-m top,right,bottom,left
- 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.
- .TP
- .B \-e
- Exclude contents of box rather than include them.
- .TP
- .B \-o filename
- The output filename.
- .SH SIGN
- mutool sign [options] input.pdf [signature object number]
- .PP
- Reads a PDF file and prints infromation about each signature field object. With
- suitable options all or specified signatures can be verified, cleared or signed.
- .TP
- .B \-p password
- Use the specified password if the file is encrypted.
- .TP
- .B \-v
- Verify all signatures, or only the specified signature.
- .TP
- .B \-c
- Clear all signatures, or only the specified signature.
- .TP
- .B \-s certificate-filename
- Read a certificate from the given filename and use it to sign all, or just the specified signature.
- .TP
- .B \-P certificate-password
- Use the specified password when opening the certificate.
- .TP
- .B \-o filename
- The output filename.
- .B signature object numbers
- A list of PDF object number for signatures to verify/clear/sign. If no such object numbers are given, all signatures will be
- processed.
- .SH AUDIT
- mutool audit [options] file1.pdf file2.pdf ...
- .PP
- Outputs a report of operator and space usage for each given PDF file.
- .TP
- .B -o filename
- The output filename for the report.
- .SH OUTPUT OPTIONS
- Configuring output is done by a comma separated list of output options.
- .TP
- .B Raster format options
- These apply to output formats: cbz, png, pnm, pgm, ppm, pam, pbm, pkm.
- .IP
- .B rotate=N
- .in +4n
- Rotate rendered pagess N degrees counterclockwise.
- .in
- .IP
- .B resoution=N
- .in +4n
- Set both X and Y resolution in pixels per inch.
- .in
- .IP
- .B x-resolution=N
- .in +4n
- Set X resolution of rendred pages in pixels per inch.
- .in
- .IP
- .B y-resolution=N
- .in +4n
- Set Y resolution of rendred pages in pixels per inch.
- .in
- .IP
- .B width=N
- .in +4n
- Render pages to fit N pixels wide (ignore resolution option).
- .in
- .IP
- .B height=N
- .in +4n
- Render pages to fit N pixels tall (ignore resolution option).
- .in
- .IP
- .B colorspace=\fR(\fBgray\fR|\fBrgb\fR|\fBcmyk\fR)
- .in +4n
- Render pages using the specified colorspace.
- .in
- .IP
- .B alpha
- Render pages with alpha channel and transparent background.
- .in
- .IP
- .B graphics=\fR(\fBaaN\fR|\fBcop\fR|\fBapp\fR)
- .br
- .B text=\fR(\fBaaN\fR|\fBcop\fR|\fBapp\fR)
- .in +4n
- Set the rasterizer to use for graphics or text respectively:
- .in +4n
- .B aaN
- .in +4n
- Antialias with N bits (0 to 8).
- .in
- .B cop
- .in +4n
- Center of pixel.
- .in
- .B app
- .in +4n
- Any part of pixel.
- .in -12n
- .TP
- .B PDF options
- .IP
- .B decompress
- .in +4n
- Decompress all streams (except compress-fonts/images).
- .in
- .IP
- .B compress=\fR(\fByes\fR|\fBflate\fR|\fBbrotli\fR)
- .in +4n
- Compress all streams, if no value is given, or the value is \fByesf\R the default is to use flate.
- .in
- .IP
- .B compress-fonts
- .in +4n
- Compress object stream for embedded fonts.
- .in
- .IP
- .B compress-images
- .in +4n
- Compress object streams for images.
- .in
- .IP
- .B compress-effort=\fR(\fB0\fR|\fBPERCENTAGE\fR)
- .in +4n
- Effort spent compressing, 0 is default, otherwise percentage of max effort.
- .in
- .IP
- .B ascii
- .in +4n
- Encode object streams using ASCII hex encoding.
- .in
- .IP
- .B pretty
- .in +4n
- Pretty-print objects with indentation.
- .in
- .IP
- .B labels
- .in +4n
- Print object labels.
- .in
- .IP
- .B linearize
- .in +4n
- Optimize document for progressive loading in viewers ( no longer supported!).
- .in
- .IP
- .B clean
- .in +4n
- Pretty-print graphics commands in content streams.
- .in
- .IP
- .B sanitize
- .in +4n
- Clean up graphics command in content streams.
- .in
- .IP
- .B garbage
- .in +4n
- Garbage collect unused objects.
- .in
- .IP
- .B garbage=compact
- .in +4n
- Garbage collect unused object, and compact cross reference table.
- .in
- .IP
- .B garbage=deduplicate
- .in +4n
- Garbage collect unused objects, compact cross reference table, and recombine duplicate objects.
- .in
- .IP
- .B incremental
- .in +4n
- Write changes as incremental update.
- .in
- .IP
- .B objstms
- .in +4n
- Use object streams and cross reference streams.
- .in
- .IP
- .B appearance=\fR(\fByes\fR|\fBall\fR)
- .in +4n
- Synthesize just missing, or all, annotation/widget apperance streams.
- .in
- .IP
- .B continue-on-error
- .in +4n
- Continue saving the document even if there is an error.
- .in
- .IP
- .B decrypt
- .in +4n
- Write unencrypted document.
- .in
- .IP
- .B encrypt=\fR(\fBnone\fR|\fBkeep\fR|\fBrc4-40\fR|\fBrc4-128\fR|\fBaes-128\fR|\fBaes-256\fR)
- .in +4n
- Write encrypted document using specified encryption method.
- .in
- .IP
- .B permissions=NUMBER
- .in +4n
- Document permissions to grant when encrypting.
- .in
- .IP
- .B user-password=PASSWORD
- .in +4n
- Password required to read document.
- .in
- .IP
- .B owner-password=PASSWORD
- .in +4n
- Password required to edit document.
- .in
- .IP
- .B regenerate-id=no
- .in +4n
- Regenerate document id (default yes).
- .in
- .TP
- .B Text format options
- These apply to formats: html, xhtml, text stext.
- .IP
- .B preserve-images
- .in +4n
- Keep imagess in output.
- .in
- .IP
- .B preserve-ligatures
- .in +4n
- Do not expand ligature into constituent characters.
- .in
- .IP
- .B preserve-spans
- .in +4n
- Do not merge spans on the same line.
- .in
- .IP
- .B preserve-whitespace
- .in +4n
- Do not convert all whitespace into space characters.
- .in
- .IP
- .B inhibit-spaces
- .in +4n
- Do not add spaces between gaps in the text.
- .in
- .IP
- .B paragraph-break
- .in +4n
- Break blocks at paragraph boundaries.
- .in
- .IP
- .B dehyphenate
- .in +4n
- Attempts to join up hyphenated words.
- .in
- .IP
- .B ignore-actualtext
- .in +4n
- Do not apply ActualText replacements.
- .in
- .IP
- .B use-cid-for-unknown-unicode
- .in +4n
- Use character code if unicode mapping fails.
- .in
- .IP
- .B use-gid-for-unknown-unicode
- .in +4n
- Use glyph index if unicode mapping fails.
- .in
- .IP
- .B accurate-bboxes
- .in +4n
- Calculate bboxes from the outlines.
- .in
- .IP
- .B accurate-ascenders
- .in +4n
- Calculate ascender/descender from font glyphs.
- .in
- .IP
- .B accurate-side-bearings
- .in +4n
- Expand character bboxes to completely include width of glyphs.
- .in
- .IP
- .B collect-styles
- .in +4n
- Attempt to detect text features (fake bold, strikeout, underlined, etc.)
- .in
- .IP
- .B clip
- .in +4n
- Do not include text that is completely clipped.
- .in
- .IP
- .B clip-rect=x0:y0:x1:y1
- .in +4n
- Specify clipping rectangle within which to collect content.
- .in
- .IP
- .B structured
- .in +4n
- Collect structure markup.
- .in
- .IP
- .B vectors
- .in +4n
- Include vector bboxes in output.
- .in
- .IP
- .B segment
- .in +4n
- Attempt to segment the page.
- .in
- .IP
- .B table-hunt
- .in +4n
- Hunt for tables within a (segmented) page.
- .in
- .TP
- .B PCL options
- .IP
- .B colorspace=\fR(\fBmono\fR|\fBrgb\fR)
- .in +4n
- Render 1-bit black and white or a full color page.
- .in
- .IP
- .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)
- .in +4n
- Render 1-bit black and white or a full color page.
- .in
- .IP
- .B spacing=\fR(\fB0\fR|\fB1\fR|\fB2\fR|\fB3\fR)
- .in +4n
- 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).
- .in
- .IP
- .B mode2
- .in +4n
- Enable mode 2 graphics compression.
- .in
- .IP
- .B mode3
- .in +4n
- Enable mode 3 graphics compression.
- .in
- .IP
- .B eog_reset
- .in +4n
- End of graphics (<ESC>+rB) resets all parameters.
- .in
- .IP
- .B has_duplex
- .in +4n
- Duplex supported (<ESC>&l<duplex>S).
- .in
- .IP
- .B has_papersize
- .in +4n
- Papersize setting supported (<ESC>&l<sizecode>A).
- .in
- .IP
- .B has_copies
- .in +4n
- Number of copies supported (<ESC>&l<copies>X).
- .in
- .IP
- .B is_ljet4pjl
- .in +4n
- Disable/enable HP 4PJL model-specific output.
- .in
- .IP
- .B is_oce9050
- .in +4n
- Disable/enable Oce 9050 models-specific output.
- .in
- .TP
- .B PCLm options
- .IP
- .B compression=\fR(\fBnone\fR|\fBflate\fR)
- .in +4n
- No compression (default), or enable flate compression.
- .in
- .IP
- .B strip-height=N
- .in +4n
- Strip height (default 16).
- .in
- .TP
- .B PWG options
- .IP
- .B media_class=<string>
- .in +4n
- Set the media_class field.
- .in
- .IP
- .B media_color=<string>
- .in +4n
- Set the media_color field.
- .in
- .IP
- .B media_type=<string>
- .in +4n
- Set the media_type field.
- .in
- .IP
- .B output_type=<string>
- .in +4n
- Set the output_type field.
- .in
- .IP
- .B rendering_intent=<string>
- .in +4n
- Set the rendering_intent field.
- .in
- .IP
- .B page_size_name=<string>
- .in +4n
- Set the page_size_name field.
- .in
- .IP
- .B advance_distance=<int>
- .in +4n
- Set the advance_distance field.
- .in
- .IP
- .B advance_media=<int>
- .in +4n
- Set the advance_media field.
- .in
- .IP
- .B collate=<int>
- .in +4n
- Set the collate field.
- .in
- .IP
- .B cut_media=<int>
- .in +4n
- Set the cut_media field.
- .in
- .IP
- .B duplex=<int>
- .in +4n
- Set the duplex field.
- .in
- .IP
- .B insert_sheet=<int>
- .in +4n
- Set the insert_sheet field.
- .in
- .IP
- .B jog=<int>
- .in +4n
- Set the jog field.
- .in
- .IP
- .B leading_edge=<int>
- .in +4n
- Set the leading_edge field.
- .in
- .IP
- .B manual_feed=<int>
- .in +4n
- Set the manual_feed field.
- .in
- .IP
- .B media_position=<int>
- .in +4n
- Set the media_position field.
- .in
- .IP
- .B media_weight=<int>
- .in +4n
- Set the media_weight field.
- .in
- .IP
- .B mirror_print=<int>
- .in +4n
- Set the mirror_print field.
- .in
- .IP
- .B negative_print=<int>
- .in +4n
- Set the negative_print field.
- .in
- .IP
- .B num_copies=<int>
- .in +4n
- Set the num_copies field.
- .in
- .IP
- .B orientation=<int>
- .in +4n
- Set the orientation field.
- .in
- .IP
- .B output_face_up=<int>
- .in +4n
- Set the output_face_up field.
- .in
- .IP
- .B page_size_x=<int>
- .in +4n
- Set the page_size_x field.
- .in
- .IP
- .B page_size_y=<int>
- .in +4n
- Set the page_size_y field.
- .in
- .IP
- .B separations=<int>
- .in +4n
- Set the separations field.
- .in
- .IP
- .B tray_switch=<int>
- .in +4n
- Set the tray_switch field.
- .in
- .IP
- .B tumble=<int>
- .in +4n
- Set the tumble field.
- .in
- .IP
- .B media_type_num=<int>
- .in +4n
- Set the media_type_num field.
- .in
- .IP
- .B compression=<int>
- .in +4n
- Set the compression field.
- .in
- .IP
- .B row_count=<int>
- .in +4n
- Set the row_count field.
- .in
- .IP
- .B row_feed=<int>
- .in +4n
- Set the row_feed field.
- .in
- .IP
- .B row_step=<int>
- .in +4n
- Set the row_step field.
- .in
- .TP
- .B SVG options
- .IP
- .B text=text
- .in +4n
- Emit text as <text> elements (inaccurate fonts).
- .in
- .IP
- .B text=path
- .in +4n
- Emit text as <path> elements (accurate fonts).
- .in
- .IP
- .B no-reuse-images
- .in +4n
- Do not reuse image using <symbol> definitions.
- .in -4n
- .SH EXIT STATUS
- The exit status is 0 upon successful execution and non-zero upon error.
- .SH SEE ALSO
- .BR mupdf (1),
- .SH AUTHOR
- MuPDF is Copyright 2004-2025 Artifex Software, Inc.
|