mutool convert¶
The convert command converts an input file into another format.
mutool convert [options] file [pages]
Note
Command line parameters within square brackets [] are optional.
[options]Options are as follows:
-ppasswordUse the specified password if the file is encrypted.
-ooutputThe output file name. The output format is inferred from the output filename. Embed
%din 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 tostdout.-Foutput format (default inferred from output file name)raster:
cbz,png,pnm,pgm,ppm,pam,pbm,pkm.print-raster:
pcl,pclm,ps,pwg.vector:
pdf,svg.text:
html,xhtml,text,stext.
-AbitsSpecify how many bits of anti-aliasing to use. The default is
8.-WwidthPage width in points for EPUB layout.
-HheightPage height in points for EPUB layout.
-SsizeFont size in points for EPUB layout.
-UfilenameUser CSS stylesheet for EPUB layout.
-XDisable document styles for EPUB layout.
-Ocomma separated list of options for output format.- Raster output options:
rotate=NRotate rendered pages N degrees counterclockwise.resolution=NSet both X and Y resolution in pixels per inch.x-resolution=NX resolution of rendered pages in pixels per inch.y-resolution=NY resolution of rendered pages in pixels per inch.width=NRender pages to fit N pixels wide (ignore resolution option).height=NRender pages to fit N pixels tall (ignore resolution option).colorspace=(gray|rgb|cmyk)Render using specified colorspace.alphaRender pages with alpha channel and transparent background.graphics=(aaN|cop|app)Set the rasterizer to use for graphics.aaNAntialias with N bits (0 to 8).copCenter of pixel.appAny part of pixel.
text=(aaN|cop|app)Set the rasterizer to use for text.aaNAntialias with N bits (0 to 8).copCenter of pixel.appAny part of pixel.
- PCL output options:
colorspace=monoRender 1-bit black and white page.colorspace=rgbRender full color page.preset=generic|ljet4|dj500|fs600|lj|lj2|lj3|lj3d|lj4|lj4pl|lj4d|lp2563b|oce9050.spacing=0No vertical spacing capability.spacing=1PCL 3 spacing (<ESC>*p+<n>Y).spacing=2PCL 4 spacing (<ESC>*b<n>Y).spacing=3PCL 5 spacing (<ESC>*b<n>Y and clear seed row).mode2Enable mode 2 graphics compression.mode3Enable mode 3 graphics compression.eog_resetEnd of graphics (<ESC>*rB) resets all parameters.has_duplexDuplex supported (<ESC>&l<duplex>S).has_papersizePapersize setting supported (<ESC>&l<sizecode>A).has_copiesNumber of copies supported (<ESC>&l<copies>X).is_ljet4pjlDisable/Enable HP 4PJL model-specific output.is_oce9050Disable/Enable Oce 9050 model-specific output.
- PCLm output options:
compression=noneNo compression (default).compression=flateFlate compression.strip-height=NStrip height (default 16).
- PWG output options:
media_class=Set the media_class field.media_color=Set the media_color field.media_type=Set the media_type field.output_type=Set the output_type field.rendering_intent=Set the rendering_intent field.page_size_name=Set the page_size_name field.advance_distance=Set the advance_distance field.advance_media=Set the advance_media field.collate=Set the collate field.cut_media=Set the cut_media field.duplex=Set the duplex field.insert_sheet=Set the insert_sheet field.jog=Set the jog field.leading_edge=Set the leading_edge field.manual_feed=Set the manual_feed field.media_position=Set the media_position field.media_weight=Set the media_weight field.mirror_print=Set the mirror_print field.negative_print=Set the negative_print field.num_copies=Set the num_copies field.orientation=Set the orientation field.output_face_up=Set the output_face_up field.page_size_x=Set the page_size_x field.page_size_y=Set the page_size_y field.separations=Set the separations field.tray_switch=Set the tray_switch field.tumble=Set the tumble field.media_type_num=Set the media_type_num field.compression=Set the compression field.row_count=Set the row_count field.row_feed=Set the row_feed field.row_step=Set the row_step field.
- Text output options:
inhibit-spacesDon’t add spaces between gaps in the text.preserve-imagesKeep images in output.preserve-ligaturesDo not expand ligatures into constituent characters.preserve-whitespaceDo not convert all whitespace into space characters.preserve-spansDo not merge spans on the same line.dehyphenateAttempt to join up hyphenated words.mediabox-clip=noInclude characters outside mediabox.
- PDF output options:
decompressDecompress all streams (except compress-fonts/images).compressCompress all streams.compress-fontsCompress embedded fonts.compress-imagesCompress images.asciiASCII hex encode binary streams.prettyPretty-print objects with indentation.linearizeOptimize for web browsers.cleanPretty-print graphics commands in content streams.sanitizeSanitize graphics commands in content streams.incrementalWrite changes as incremental update.continue-on-errorContinue saving the document even if there is an error.garbageGarbage collect unused objects.or
garbage=compact… and compact cross reference table.or
garbage=deduplicate… and remove duplicate objects.decryptWrite unencrypted document.encrypt=rc4-40|rc4-128|aes-128|aes-256Write encrypted document.permissions=NUMBERDocument permissions to grant when encrypting.user-password=PASSWORDPassword required to read document.owner-password=PASSWORDPassword required to edit document.regenerate-idRegenerate document id (default yes).
- SVG output options:
text=textEmit text as <text> elements (inaccurate fonts).text=pathEmit text as <path> elements (accurate fonts).no-reuse-imagesDo not reuse images using <symbol> definitions.
fileInput file name. The input can be any of the document formats supported by MuPDF.
[pages]Comma separated list of page ranges. The first page is “1”, and the last page is “N”. The default is “1-N”.
This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, CA 94129, USA, for further information.