35.3 Convert

The convert utility performs a similar task to the draw utility, using a different internal mechanism (the document writer interface). Which is better for any given task is often a matter of taste.

$ mutool convert 
mutool convert version 1.11 
Usage: mutool convert [options] file [pages] 
      -p -   password 
 
      -A -   number of bits of antialiasing (0 to 8) 
      -W -   page width for EPUB layout 
      -H -   page height for EPUB layout 
      -S -   font size for EPUB layout 
      -U -   file name of user stylesheet for EPUB layout 
      -X    disable document styles for EPUB layout 
 
      -o -   output file name (%d for page number) 
      -F -   output format (default inferred from output file name) 
                  png, pnm, pgm, ppm, pam, tga, pbm, pkm, 
                  pdf, svg, cbz 
      -O -   comma separated list of options for output format 
 
      pages  comma separated list of page ranges (N=last page) 
 
Common raster format output options: 
      rotate=N: rotate rendered pages N degrees counterclockwise 
      resolution=N: set both X and Y resolution in pixels per inch 
      x-resolution=N: X resolution of rendered pages in pixels per inch 
      y-resolution=N: Y resolution of rendered pages in pixels per inch 
      width=N: render pages to fit N pixels wide (ignore resolution option) 
      height=N: render pages to fit N pixels tall (ignore resolution option) 
      colorspace=(gray|rgb|cmyk): render using specified colorspace 
      alpha: render pages with alpha channel and transparent background 
 
Structured text output options: 
      preserve-ligatures: do not expand all ligatures into constituent characters 
      preserve-whitespace: do not convert all whitespace characters into spaces 
 
PDF output options: 
      decompress: decompress all streams (except compress-fonts/images) 
      compress: compress all streams 
      compress-fonts: compress embedded fonts 
      compress-images: compress images 
      ascii: ASCII hex encode binary streams 
      pretty: pretty-print objects with indentation 
      linearize: optimize for web browsers 
      sanitize: clean up graphics commands in content streams 
      garbage: garbage collect unused objects 
      or garbage=compact: ... and compact cross reference table 
      or garbage=deduplicate: ... and remove duplicate objects 
 
SVG output options: 
      text=text: Emit text as <text> elements (inaccurate fonts). 
      text=path: Emit text as <path> elements (accurate fonts). 
      no-reuse-images: Do not reuse images using <symbol> definitions.