mutool-draw - Render a document to images, vectors or text
SYNOPSIS
mutool draw [options] file
[pages]
DESCRIPTION
The draw command will render a document to image files, convert to
another vector format, or extract the text content.
The supported input document formats are: pdf, xps, cbz, md, and
epub.
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 or json).
OPTIONS
The options are:
-ppassword
Use the specified password if the file is encrypted.
-ooutput
The output file name. 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 for text
output formats, for image output formats nothing is outputted.
-Fformat
Enforce a specific output format. Only necessary when outputting to
stdout since normally the output format is inferred from the output
filename.
Render the page at the specified resolution. The default resolution is
72 dpi.
-wwidth
Render the page at the specified width (or, if the -r
flag is used, render with a maximum width).
-hheight
Render the page at the specified height (or, if the -r
flag is used, render with a maximum height).
-f
Fit exactly; ignore the aspect ratio when matching specified
width/heights.
-bbox
Use named page box (MediaBox, CropBox,
BleedBox, TrimBox, or
ArtBox).
-Bbandheight
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.
-Tthreads
Number of threads to use for rendering (banded mode only).
-Wwidth
Page width in points for EPUB layout.
-Hheight
Page height in points for EPUB layout.
-Ssize
Font size in points for EPUB layout.
-Ufilename
User CSS stylesheet for EPUB layout.
-X
Disable document styles for EPUB layout.
-a
Disable usage of accelerator file.
-ccolorspace
Render in the specified colorspace. The default is chosen based on the
output format. Supported colorspaces are (abbreviations are allowed):
mono (or m)
gray (or g)
grayalpha (or ga)
rgb (or rgb)
rgbalpha (or rgba)
cmyk (or cmyk)
cmykalpha (or cmyka)
-efilename
Proof ICC profile filename for rendering.
-Ggamma
Apply gamma correction. Some typical values are 0.7 or 1.4 to thin or
darken text rendering.
-I
Invert colors.
-s [mft5]
Show various bits of information: m for glyph cache and
total memory usage, f for page features such as whether
the page is grayscale or color, t for per page
rendering times as well statistics, and 5 for md5
checksums of rendered images which indicate if rendering has changed.
-Abits
Specify how many bits of anti-aliasing to use. The default is
8. 0 means no anti-aliasing,
9 means no anti-aliasing, centre-of-pixel rule,
10 means no anti-aliasing, any-part-of-a-pixel rule.
-Agraphics-bits**/**text-bits
Specify separate numbers of bits for anti-aliasing for graphics and for
text, use a slash / as separator.
-lwidth
Minimum stroke line width (in pixels).
-K
Do not draw text.
-KK
Only draw text.
-D
Disable use of display lists. May cause slowdowns, but should reduce the
amount of memory used.
-i
Ignore errors. Use this to avoid one broken file causing all files after
from rendering.
-mlimit
Limit memory usage in bytes.
-L
Low memory mode (avoid caching objects by clearing cache after each
page).
Allow access to current directory containing file for external
resources.
-P
Run interpretation and rendering at the same time.
-N
Disable ICC workflow.
-Moverprint
Control spot/overprint rendering: 0 for no spot
rendering, 1 for Overprint simulation (default), or
2 for full spot rendering.
-tlanguage
Specify language/script for OCR (default: eng)
-docr-file-path
Specify path for OCR files (default: rely on
TESSDATA_PREFIX environment variable).
-kcorrection
Set the skew correction, either one of auto,
0 for increase size, 1 for maintain
size, or 2 for decrease size.
-kcorrection,angle
Set the skew correction as well as the angle.
-yl
Print the layer configs to stderr.
-ylayer-number
Select layer config (by number from -y l).
-ylayer-number**,
item1, item2,**
…
Select layer config (by number from -y l) and toggle the listed items.
-Y
Print the individual layers to stderr.
-zlayer-number
Hide individual layer.
-Zlayer-number
Show individual layer.
file
Input file name.
[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.