Section:

Command-Line Summary for DocPub

sh

1Usage: docpub [<options>] file...
2
3OPTIONS:
4
5 -h [ --help ] Print a listing of available options.
6
7 -v [ --version ] Print the version information.
8
9 --file... arg A list of folders and/or file names to
10 process.
11
12 -s [ --subfolders ] Process all subfolders.
13
14 -f [ --format ] arg The output format. The following is a list
15 of supported export formats:
16 pdf
17 xps (Print XPS)
18 xod (Web optimized XPS, WebViewer format)
19 html
20 epub
21 epub_exp (epub expanded)
22
23 -o [ --outdir ] arg The output directory. The folder can be
24 relative to the current working folder. If
25 the folder does not exist DocPub will
26 attempt to create the required path. If
27 this parameter is not specified all files
28 will be saved relative to the current
29 working folder.
30
31 --fname arg The explicit name for the converted file.
32 The parameter is used only when converting
33 one file at a time. The output file will
34 be stored in the 'outdir' folder.
35
36 --extension arg The file extension which filters the files
37 to be processed by the specified type.
38
39 -p [ --pass ] arg The password to process the input file.
40 The password is required only when the
41 input document is encrypted.
42
43 --noprompt Disables any user input. By default, the
44 application will ask for a valid password
45 if the password is incorrect.
46
47 --suffix arg A string to append to all output
48 filenames. This option is typically used
49 to tag output filenames during multi-file
50 or batch conversion. For example, if input
51 file is "my.pdf" and suffix is "_pdfa" the
52 output filename will be "my_pdfa.pdf".
53
54 -e [ --output_extension ] arg The file extension which will replace the
55 output format extension. For example if
56 the output format is set to 'xod' and
57 output extension is set to 'xps' the
58 extension of the output file will be
59 '.xps'
60
61 -z [ --linearize ] Linearize the converted PDF files.
62
63 --verb arg (=1) Set the verbosity level to 'arg' (0-5).
64
65 --noprinter Disable virtual print driver use.
66
67 --config arg Load xml file to configure font
68 substitution for missing fonts. By
69 default, tries to load the file
70 "config.xml" in the current working
71 directory.
72
73 --xfdf arg (For PDF output only.) Merge xfdf file
74 into PDF output.
75
76 -d [ --dpi ] arg (=140) For conversions to .xps, .xod, .html or
77 .epub only. The output resolution, from 1
78 to 1000, in Dots Per Inch (DPI) at which
79 to render elements which cannot be
80 directly converted. The higher the DPI,
81 the largre the image.
82
83 --printmode For conversions to .xps or .xod only.
84 Renders annotations in the print mode.
85 This option can be used to render 'Print
86 Only' annotations and to hide 'Screen
87 Only' annotations.
88
89 --norender For conversions to .xps or .xod only.
90 Disables rendering of pages which cannot
91 be mapped accurately.
92
93 --enhance_thin_lines arg (=true) For conversions to .xps or .xod only. If
94 converting from PDF can enable or disable
95 making thin lines appear thicker in the
96 output document. This is useful because
97 some thin lines can appear invisible in
98 XPS/XOD, but not in the original PDF.
99
100 true, thin lines are enhanced.
101 false, lines are not enhanced.
102 By default, true is used.
103
104 --url_links For conversions to .xps, .xod, .html or
105 .epub only. By default links are not
106 generated for urls found in the document.
107 This option enables that generation.
108 --internal_links For conversions to .html or .epub only. By
109 default internal page jumps are not
110 generated for go to page navigations found
111 in the document. This option enables that
112 generation.
113 --op arg (=pdfx) For conversions to .xps or .xod only.
114 Specifies if overprint simulation is used.
115 Overprint is a device dependent feature
116 and the results will vary depending on the
117 output color space and supported colorants
118 (i.e. CMYK, CMYK+spot, RGB, etc). Possible
119 values are:
120 off, overprint is turned off
121 on, overprint is turned on
122 pdfx, overprint is turned on only for
123 PDF/X files
124 By default, pdfx is used.
125
126 --nothumbs For conversions to .xod only. Exclude
127 thumbnails from the document.
128
129 --thumbsize arg (=400,1500) For conversions to .xod only. The width
130 and height of a square (pixels) in which
131 thumbnails will be contained. The value
132 can be specified as a single number which
133 applies to all thumbnails or as two comma
134 separated values normal,large in order to
135 specify a different size for large PDF
136 pages. The default value is 400 pixels for
137 normal pages and 1500 pixels for large
138 pages.
139 --console_out For conversions to .xod only and exactly
140 one input file may be specified. Write
141 the output to the console rather than a
142 file which allows output files to be
143 streamed to the consumer.
144
145 --mask_workaround For conversions to .xod only. Enable
146 rendering of pages containing opacity
147 masks. This option is used as a
148 workaround to a bug in Silverlight where
149 opacity masks are transformed incorrectly.
150 --silverlight_text_workaround For conversions to .xod only. Outputs
151 rotated text as paths. This option is used
152 as a workaround to a bug in Silverlight
153 where pages with rotated text could cause
154 the plugin to crash.
155 --max_image_pixels arg (=10000000) For conversions to .xod, .pdf (with
156 flattening), .html or .epub. Specifies the
157 maximum image size in pixels.
158 --scale arg (=1) For conversions to .html or .epub only.
159 Adjusts the generated html page size.
160
161 --epub_reuse_cover For conversions to .epub only. The first
162 EPUB page uses the cover image, and will
163 have no selectable text.
164 --simplify_text Produces lightweight HTML output that
165 loads faster, but placement of individual
166 characters may be less precise.
167 The option applies only to HTML/EPUB
168 output.
169
170 --flatten arg For conversions to .xod and to .pdf only.
171 Used to reduce some PDF content to a
172 simple background image. While flattening
173 tries to preserve vector text, some text
174 might be flattened, especially in simple
175 mode.
176 off, disable flattening.
177 fast, will convert content deemed
178 complex to a background image, while
179 trying to preserve vector text, and
180 keeping file size down.
181 simple, reduces the PDF to two layers; a
182 RGB background image layer and an
183 overlapping vector text layer.
184 By default, fast is used for conversion to
185 .xod and off is used for conversion to
186 .pdf.
187
188 --flatten_threshold arg (=default) For conversions that use --flatten
189 [simple|fast]. Used to control how precise
190 or relaxed text flattening is. Some text
191 can be preserved (not flattened to image)
192 at the expense that the output might not
193 be exactly the same as the input.
194 very_strict, render (flatten) any text
195 that is clipped or occluded.
196 strict, render text that are marginally
197 clipped or occluded.
198 default, render text that are somewhat
199 clipped or occluded.
200 keep_most, only render text that are
201 seriously clipped or occluded.
202 keep_all, only render text that are
203 completely occluded, or used as a
204 clipping path.
205
206 --prefer_jpg arg (=true) For conversions to .xod, .html, .epub or
207 to .pdf with --flatten [simple|fast],
208 only. Where possible, output JPG files
209 rather than PNG. This will apply to both
210 thumbnails and document images.
211 true, generate JPG whenever possible.
212 false, no preference given to JPG.
213 By default, true is used.
214
215 --builtin_docx arg (=false) For conversions from .docx format, prefer
216 the built-in native conversion over any
217 system dependent conversion
218 true, use native conversion whenever
219 possible (currently for .docx only).
220 false, will only use native conversion
221 if there are no other methods available.
222 By default, native conversion is not
223 preferred.
224
225 --resource_doc arg The path to an office document that will
226 be searched for embedded resources during
227 office conversion process. This document
228 could contain embedded fonts that are not
229 present in the document to convert, for
230 example. This setting only has an effect
231 for office conversions using the built-in
232 converter (see the "builtin_docx" option)
233 --jpg_quality arg Set JPG compression quality, from 0 to
234 100.
235 --external_parts For conversions to .xod only. Output XOD
236 as a collection of loose files rather than
237 a zip archive. This option should be used
238 when using the external part retriever in
239 WebViewer.
240 --silverlight_flash_compatible For conversions to .xod only. The latest
241 XOD format is only partially supported in
242 Silverlight and Flash due to various
243 optimizations in the text format and the
244 addition of blend mode support. This
245 option forces the converter to use an
246 older version of XOD that is
247 Silverlight/Flash compatible but does not
248 have these improvements. By default the
249 latest XOD format is generated.
250 --xod_encrypt_password arg For conversions to .xod only. Encrypt XOD
251 parts with AES 128 encryption using the
252 supplied password.
253 --annotations arg For conversions to .xod only. Choose how
254 to output annotations. The following is a
255 list of supported annotation output
256 options:
257 internal (include the annotation file in
258 the XOD output. This is the default
259 option.)
260 external (output the annotation file
261 externally to the same output path with
262 extension .xfdf. This option is not
263 available with the console_out option)
264
265Examples:
266 docpub in1.pdf in2.xps -o todir
267 docpub fromdir -o todir -f pdf
268 docpub -o outdir in.doc -f xps
269 docpub fromdir -o outdir -z --subfolders --verb 2 -f xps

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales