MUTOOL(1) General Commands Manual MUTOOL(1) (NAME) mutool - PDF (SYNOPSIS) mutool sub-command [options] (DESCRIPTION) mutool MuPDF . . (VERSION) mutool -v MuPDF mutool . AUDIT mutool audit [options] file1.pdf [file2.pdf ...] PDF . -o filename . BAKE mutool bake [options] input.pdf [output.pdf] (annotations) . / (bake) . / / . -A . -F . -O options PDF . PDF OUTPUT OPTIONS . BARCODE mutool barcode -d [options] file1.pdf [pages1] [file2.pdf] [pages2] . -p password . -o output . stdout . -r angle (0-360) . pages ( : 1,5,10-15,20-N) N . . mutool barcode -c [options] text text . -o output (PNG PDF) . out.png . -F format : aztec codabar code39 code93 code128 databar databarexpanded datamatrix ean8 ean13 itf maxicode pdf417 qrcode upca upce microqrcode rmqrcode dxfilmedge databarlimited -s size . . -q (quiet zones) . . -t . EAN-13 . -t level (0-8). QR- code . text . mutool clean [options] input.pdf [output.pdf] [pages ...] clean (syntax) PDF (pretty print) . (streams) . PDF "out.pdf" . -p password (password) . -g (Garbage collect) (objects) . -gg -g (cross reference table) . -ggg -gg . -gggg -ggg (streams) . -l ! (Linearize) . << >> (Web Optimized) . -D . -E method : rc4-40rc40-128aes-128 aes-256. -O password (Owner password) . . -U password (User password) . . -P permissions . . -a (ASCII Hex encode) (binary streams). -d -i -f / . -d (Decompress). . -z (Deflate) . -d . -a . -e effort . 0 1 100 . -f (font streams) . -d . -i (image streams) . -d . -c (Pretty-print) (content streams). -s (Sanitize) . -t PDF. . -tt PDF. . -L (comments) Root . -v (vector graphics commands). -A (appearance streams) (annotations) . -AA . -m (metadata). -S (Subset fonts) . (!) -Z (object streams) (cross reference streams) . --(color|gray|bitonal)-(|lossy-|lossless-)image-subsample-method=method (subsampling method) (average bicubic) color-lossy bitonal-lossless. --(color|gray|bitonal)-(|lossy-|lossless-)image-subsample-dpi=dpi[,dpi] (dpi) . --(color|gray|bitonal)-(|lossy-|lossless-)image-recompress-method=quality : never same lossless jpeg j2k fax jbig2. --recompress-images-when=(smaller|always) smaller () always . --structure=(keep|drop) (structure tree)..TP pages ( : 1,5,10-15,20-N) N . . (CONVERT) mutool convert [options] input.pdf [pages ...] convert . -p password . -o output . %d ( : "page%d.png"). Printf "%03d". stdout . -F format . stdout . -O options PDF OUTPUT OPTIONS OUTPUT OPTIONS . -b box page box (MediaBox, CropBox, BleedBox, TrimBox, ArtBox). -A bits (anti-aliasing). 8 . -W width EPUB. -H height EPUB. -S size EPUB. -U filename CSS EPUB. -X EPUB. pages ( : 1,5,10-15,20-N) N . . (CREATE) mutool create [-o output.pdf] [options] page.txt [page2.txt ...] create PDF . -o output PDF "out.pdf" . -O options PDF OUTPUT OPTIONS . page.txt (content stream) . : %%MediaBox LLX LLY URX URY ( A4). %%Rotate Angle ( 90 ). %%Font Name Filename Encoding Name . Filename Base-14 (Times-Roman ). (Encoding) Latin ( ISO-8859-1) Greek ( ISO-8859-7) Cyrillic ( KOI-8) . %%Font Name Language WMode Style Language CID CJK Name . Language zh-Hant zh-Hans ja ko . Wmode H V . Style serif sans . %%Image Im0 path/to/image.png . (COMPLETE EXAMPLE) : %%MediaBox 0 0 595 842 %%Font TmRm Times-Roman %%Font Helv-C Helvetica Cyrillic %%Font Helv-G Helvetica Greek %%CJKFont Song zh-Hant %%CJKFont Mincho ja %%CJKFont Batang ko %%Image I0 docs/examples/huntingofthesnark.png % Draw an image. q 480 0 0 480 50 250 cm /I0 Do Q % Draw a triangle. q 1 0 0 rg 50 50 m 100 200 l 200 50 l f Q % Show some text. q 0 0 1 rg BT /TmRm 24 Tf 50 760 Td (Hello, world!) Tj ET BT /Helv-C 24 Tf 50 730 Td Tj ET BT /Helv-G 24 Tf 50 700 Td Tj ET BT /Song 24 Tf 50 670 Td <4F60 597D> Tj ET BT /Mincho 24 Tf 50 640 Td <3053 3093 306b 3061 306f> Tj ET BT /Batang 24 Tf 50 610 Td Tj ET Q mutool draw [] [ ...] draw . : pdf, xps, cbz, md epub. : pbm, pgm, ppm, pam, png, pwg, pcl ps. : svg pdf debug trace ( xml). : plain text html ( xml json). -p password . -o output . %d ( : "page%d.png"). Printf "%03d" . stdout . -F format . stdout . -q . -R angle . -r resolution () . 72 dpi . -w width ( -r ). -h height ( -r ). -f / (aspect ratio) . -b box (page box) (MediaBox CropBox BleedBox TrimBox ArtBox). -B bandheight (banded mode) . . pam pgm ppm pnm png . md5 . -T threads (threads) ( ). -W width EPUB. -H height EPUB. -S size EPUB. -U filename CSS EPUB. -X EPUB. -a . -c colorspace . : mono gray grayalpha rgb rgbalpha cmyk cmykalpha. : m g ga rgba cmyka. . -e filename ICC (Proof ICC profile) . -G gamma (gamma correction). 0.7 1.4 . -I . -s [mft5] : m (glyph cache) f t 5 md5 . -A bits anti-aliasing . 8 . -A bits/bits anti-aliasing . 8 . () . -l width ( ). -K . -KK . -D (display lists). . -i . -m limit . -L ( ). -P . -N ICC. -M overprint / (spot/overprint): 0 spot 1 Overprint () 2 spot..TP -t language / OCR (: eng) -d ocr-file-path OCR (: TESSDATA_PREFIX ). -k correction (skew correction) auto 0 1 2 . -k correction,angle . -y l stderr. -y layer-number ( -y l ). -y layer-number,item1,item2, ... ( -y l ) . -Y stderr. -z layer-number . -Z layer-number . pages ( : 1,5,10-15,20-N) N . . (EXTRACT) mutool extract [] file.pdf [object-number ...] extract PDF . . -p password . -r RGB . -a SMask . -N ICC. (INFO) mutool info [] file.pdf [pages ...] info PDF . . -p password . -F . -I . -M . -P (patterns). -S (shadings). -X XObject form postscript. -Z ZUGFeRD. pages ( : 1,5,10-15,20-N) N . . mutool merge [options] file1 [pages1] [file2 [pages2] ...] merge PDF . -o output . -O options PDF OUTPUT OPTIONS . PAGES mutool pages [options] input.pdf [pages ...] pages . -p password . pages ( : 1,5,10-15,20-N) N . . POSTER mutool poster [options] input.pdf [output.pdf] poster () . . -p password . -m margin () . -x factor . -y factor . -r ( ). x y . RECOLOR mutool recolor [options] input.pdf PDF . PDF (grayscale) . -c colorspace : gray () rgb cmyk. -o filename . -r (output intents) . mutool run script.js [arguments] Javascript MuPDF . ECMAScript 5 strict . MuPDF (global object) argv . REPL ( --) . . Javascript MuPDF https://mupdf.readthedocs.io . SHOW mutool show [options] file.pdf [object-number ...] show (streams) stdout . . -p password . -o file stdout. -e ( ) . -b . -g grep. -r . -L ( ). : 'trailer' trailer. 'xref' (cross reference). 'pages' . 'grep' grep. 'outline' ( << >> <<>> ). 'js' Javascript . 'form' . trailer trailer pages . . / . pages/N N . . * * . mutool sign [options] input.pdf [signature-object-number ...] PDF . . -p password . -v . -c . -s certificate-filename . -P certificate-password . -o filename . signature object numbers PDF // . . (TRACE) mutool trace [options] file1 [pages1] [file2 [pages2] ...] . -p password . -b box : (MediaBox () CropBox BleedBox TrimBox ArtBox). -W width EPUB. -H height EPUB. -S size EPUB. -U filename CSS EPUB. -X EPUB. -d (display lists). pages ( : 1,5,10-15,20-N) N . . mutool trim [] input.pdf PDF ( ) . -b box : (MediaBox () CropBox BleedBox TrimBox ArtBox). -f mediabox . -m all all . -m vertical,horizontal vertical horizontal . -m top,right,bottom,left top right bottom left . -e () . -o filename . (OUTPUT OPTIONS) . (Raster output options) : cbz, png, pnm, pgm, ppm, pam, pbm, pkm. rotate=N N . resolution=N X Y N . x-resolution=N X . y-resolution=N Y . width=N N ( resolution). height=N N ( resolution). colorspace=(gray|rgb|cmyk) . alpha . graphics=(aaN|cop|app) text=(aaN|cop|app) (rasterizer) : aaN (Antialias) N ( ). cop (Center of pixel). app (Any part of pixel). (print- raster) : pcl, pclm, ps, pwg. colorspace=(mono|rgb) - . preset=(generic|ljet4|dj500|fs600|lj|lj2|lj3|lj4|lj4pl|lj4d|lp2563b|oce9050) - . spacing=(0|1|2|3) (none) PCL 3 (*p+Y) PCL 5 (*bY) PCL 6 (*bY seed row). mode2 mode 2. mode3 mode 3. eog_reset (+rB) . has_duplex (&lS). has_papersize (&lA). has_copies (&lX). is_ljet4pjl / HP 4PJL. is_oce9050 / Oce 9050. PCLm : pclm. compression=(none|flate) () flate. strip-height=N ( ). PWG : pwg. media_class=string media_class. media_color=string media_color. media_type=string media_type. output_type=string output_type. rendering_intent=string rendering_intent. page_size_name=string page_size_name. advance_distance=int advance_distance. advance_media=int advance_media. collate=int collate. cut_media=int cut_media. duplex=int duplex. insert_sheet=int insert_sheet. jog=int jog. leading_edge=int leading_edge. manual_feed=int manual_feed. media_position=int media_position. media_weight=int media_weight. mirror_print=int mirror_print. negative_print=int negative_print. num_copies=int num_copies. orientation=int orientation. output_face_up=int output_face_up. page_size_x=int page_size_x. page_size_y=int page_size_y. separations=int separations. tray_switch=int tray_switch. tumble=int tumble. media_type_num=int media_type_num. compression=int compression. row_count=int row_count. row_feed=int row_feed. row_step=int row_step. : svg. text=text ( ). text=path ( ). no-reuse-images . (Text options) : html, xhtml, text, stext. preserve-images . preserve-ligatures (ligature) . preserve-spans span . preserve-whitespace (space). inhibit-spaces . paragraph-break . dehyphenate . ignore-actualtext ActualText. use-cid-for-unknown-unicode . use-gid-for-unknown-unicode . accurate-bboxes (bboxes) (outlines). accurate-ascenders / (ascender/descender) . accurate-side-bearings (bboxes) . collect-styles ( ). clip (clipped) . clip-rect=x0:y0:x1:y1 . structured . vectors (vector bboxes) . lazy-vectors . fuzzy-vectors . segment . table-hunt (). vertically-collapse-bordered-cells () true . : PDF. decompress ( compress- fonts/images). compress=(yes|flate|brotli) yes flate . compress-fonts . compress-images . compress-effort=(0|percentage) 0 . ascii ASCII hex. pretty (pretty-print) . labels . linearize ! . clean . sanitize . garbage (garbage collection) . garbage=compact (cross-reference). garbage=deduplicate . incremental . objstms . appearance=(yes|all) / . continue-on-error . decrypt : decrypt encrypt=none . encrypt=(none|keep|rc4-40|rc4-128|aes-128|aes-256) . keep . permissions=number . user-password=password . owner-password=password . regenerate-id=(yes|no) ( yes). reproducible=(yes|no) ( no). 0 . (SEE ALSO) mupdf(1), (AUTHOR) MuPDF 2004-2026 Artifex Software, Inc. . June 3, 2026 MUTOOL(1)