1DVIPNG(1)                        User commands                       DVIPNG(1)
2
3
4

NAME

6       dvipng - A DVI-to-PNG translator
7

SYNOPSIS

9       dvipng [options] filename
10
11       dvipng [options] [filename] -
12

DESCRIPTION

14       This program makes PNG and/or GIF graphics from DVI files as obtained
15       from TeX and its relatives.
16
17       If GIF support is enabled, GIF output is chosen by using the dvigif
18       binary or with the --gif option.
19
20       The benefits of dvipng/dvigif include
21
22       *   Speed. It is a very fast bitmap-rendering code for DVI files, which
23           makes it suitable for generating large amounts of images on-the-
24           fly, as needed in preview-latex, WeBWorK and others.
25
26       *   It does not read the postamble, so it can be started before TeX
27           finishes. There is a --follow switch that makes dvipng wait at end-
28           of-file for further output, unless it finds the POST marker that
29           indicates the end of the DVI.
30
31       *   Interactive query of options. dvipng can read options interactively
32           through stdin, and all options are usable. It is even possible to
33           change the input file through this interface.
34
35       *   Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts
36           (i.e., as used in CJK-LaTeX), color specials, and inclusion of
37           PostScript, PNG, JPEG or GIF images.
38
39       *   and more...
40

OPTIONS

42       Many of the parameterless options listed here can be turned off by
43       suffixing the option with a zero (0); for instance, to turn off page
44       reversal, use -r0.  Such options are marked with a trailing *.
45
46       -   Read additional options from standard input after processing the
47           command line.
48
49       --help
50           Print a usage message and exit.
51
52       --version
53           Print the version number and exit.
54
55       -bd num
56       -bd color_spec
57       -bd 'num color_spec'
58           Set the pixel width of the transparent border (default 0). Using
59           this option will make the image edges transparent, but it only
60           affects pixels with the background color. Giving a color_spec will
61           set the fallback color, to be used in viewers that cannot handle
62           transparency (the default is the background color). The color spec
63           should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'.
64           Setting the fallback color makes the default border width 1 px.
65
66       --bdpi num
67           This option only has an effect when using bitmapped (PK) fonts. The
68           option sets the base (Metafont) resolution, both horizontal and
69           vertical, to num dpi (dots per inch). This option is necessary when
70           manually selecting Metafont mode with the --mode option (see
71           below).
72
73       -bg color_spec
74           Choose background color for the images. This option will be ignored
75           if there is a background color \special in the DVI. The color spec
76           should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'.
77           You can also specify 'Transparent' or 'transparent' which will give
78           you a transparent background with the normal background as a
79           fallback color. A capitalized 'Transparent' will give a full-alpha
80           transparency, while an all-lowercase 'transparent' will give a
81           simple fully transparent background with non-transparent
82           antialiased pixels. The latter would be suitable for viewers who
83           cannot cope with a true alpha channel.  GIF images do not support
84           full alpha transparency, so in case of GIF output, both variants
85           will use the latter behaviour.
86
87       -d num
88           Set the debug flags, showing what dvipng (thinks it) is doing. This
89           will work unless dvipng has been compiled without the "DEBUG"
90           option (not recommended). Set the flags as you need them, use -d -1
91           as the first option for maximum output.
92
93       -D num
94           Set the output resolution, both horizontal and vertical, to num dpi
95           (dots per inch).
96
97           One may want to adjust this to fit a certain text font size (e.g.,
98           on a web page), and for a text font height of font_px pixels (in
99           Mozilla) the correct formula is
100
101                   <dpi> = <font_px> * 72.27 / 10 [px * TeXpt/in / TeXpt]
102
103           The last division by ten is due to the standard font height 10pt in
104           your document, if you use 12pt, divide by 12. Unfortunately, some
105           proprietary browsers have font height in pt (points), not pixels.
106           You have to rescale that to pixels, using the screen resolution
107           (default is usually 96 dpi) which means the formula is
108
109                   <font_px> = <font_pt> * 96 / 72 [pt * px/in / (pt/in)]
110
111           On some high-res screens, the value is instead 120 dpi. Good luck!
112
113       --depth*
114           Report the depth of the image. This only works reliably when the
115           LaTeX style preview.sty from preview-latex is used with the active
116           option. It reports the number of pixels from the bottom of the
117           image to the baseline of the image. This can be used for vertical
118           positioning of the image in, e.g., web documents, where one would
119           use (Cascading StyleSheets 1)
120
121                   <IMG SRC="<filename.png>" STYLE="vertical-align: -<depth>px">
122
123           The depth is a negative offset in this case, so the minus sign is
124           necessary, and the unit is pixels (px).
125
126       --dvinum*
127           Set this option to make the output page number be the TeX page
128           numbers rather than the physical page number. See the -o switch.
129
130       -fg color_spec
131           Choose foreground color for the images. This option will be ignored
132           if there is a foreground color \special in the DVI. The color spec
133           should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'.
134
135       --follow*
136           Wait for data at end-of-file. One of the benefits of dvipng is that
137           it does not read the postamble, so it can be started before TeX
138           finishes. This switch makes dvipng wait at end-of-file for further
139           output, unless it finds the POST marker that indicates the end of
140           the DVI. This is similar to tail -f but for DVI-to-PNG conversion.
141
142       --freetype*
143           Enable/disable FreeType font rendering (default on). This option is
144           available if the FreeType2 font library was present at compilation
145           time.  If this is the case, dvipng will have direct support for
146           PostScript Type1 and TrueType fonts internally, rather than using
147           gsftopk for rendering the fonts. If you have PostScript versions of
148           Computer Modern installed, there will be no need to generate
149           bitmapped (PK) variants on disk of these. Then, you can render
150           images at different (and unusual) resolutions without cluttering
151           the disk with lots of bitmapped fonts.  One reason to disable
152           FreeType font rendering would be to generate identical output on
153           different platforms, since FreeType uses the native renderer and
154           therefore can give slightly different output on each platform.
155
156       --gamma num
157           Control the interpolation of colors in the greyscale anti-aliasing
158           color palette.  Default value is 1.0.  For 0 < num < 1, the fonts
159           will be lighter (more like the background), and for num > 1, the
160           fonts will be darker (more like the foreground).
161
162       --gif*
163           The images are output in the GIF format, if GIF support is enabled.
164           This is the default for the dvigif binary, which only will be
165           available when GIF support is enabled. GIF images are palette
166           images (see the --palette option) and does not support true alpha
167           channels (see the --bg option). See also the --png option.
168
169       --height*
170           Report the height of the image. This only works reliably when the
171           LaTeX style preview.sty from preview-latex is used with the active
172           option. It reports the number of pixels from the top of the image
173           to the baseline of the image. The total height of the image is
174           obtained as the sum of the values reported from --height and
175           --depth.
176
177       -l [=]num
178           The last page printed will be the first one numbered num. Default
179           is the last page in the document.  If num is prefixed by an equals
180           sign, then it (and the argument to the -p option, if specified) is
181           treated as a physical (absolute) page number, rather than a value
182           to compare with the TeX \count0 values stored in the DVI file.
183           Thus, using -l =9 will end with the ninth page of the document, no
184           matter what the pages are actually numbered.
185
186       --mode mode
187           This option only has an effect when using bitmapped (PK) fonts. Use
188           mode as the Metafont device name for the PK fonts (both for path
189           searching and font generation). This needs to be augmented with the
190           base device resolution, given with the --bdpi option. See the file
191           <ftp://ftp.tug.org/tex/modes.mf> for a list of resolutions and mode
192           names for most devices.
193
194       -M* This option only has an effect when using bitmapped (PK) fonts. It
195           turns off automatic PK font generation (mktexpk).
196
197       --nogs*
198           This switch prohibits the internal call to GhostScript for
199           displaying PostScript specials. --nogs0 turns the call back on.
200
201       --nogssafer*
202           Normally, if GhostScript is used to render PostScript specials, the
203           GhostScript interpreter is run with the option -dSAFER. The
204           --nogssafer option runs GhostScript without -dSAFER. The -dSAFER
205           option in Ghostscript disables PostScript operators such as
206           deletefile, to prevent possibly malicious PostScript programs from
207           having any effect.
208
209       --norawps*
210           Some packages generate raw PostScript specials, even non-rendering
211           such specials.  This switch turns off the internal call to
212           GhostScript intended to display these raw PostScript specials.
213           --norawps0 turns the call back on.
214
215       -o name
216           Send output to the file name. A single occurrence of %d or %01d,
217           ..., %09d will be exchanged for the physical page number (this can
218           be changed, see the --dvinum switch). The default output filename
219           is file%d.png where the input DVI file was file.dvi.
220
221       -O x-offset,y-offset
222           Move the origin by x-offset,y-offset, a comma-separated pair of
223           dimensions such as .1in,-.3cm.  The origin of the page is shifted
224           from the default position (of one inch down, one inch to the right
225           from the upper left corner of the paper) by this amount.
226
227       -p [=]num
228           The first page printed will be the first one numbered num. Default
229           is the first page in the document.  If num is prefixed by an equals
230           sign, then it (and the argument to the -l option, if specified) is
231           treated as a physical (absolute) page number, rather than a value
232           to compare with the TeX \count0 values stored in the DVI file.
233           Thus, using -p =3 will start with the third page of the document,
234           no matter what the pages are actually numbered.
235
236       --palette*
237           When an external image is included, dvipng will automatically
238           switch to truecolor mode, to avoid unnecessary delay and quality
239           reduction, and enable the EPS translator to draw on a transparent
240           background and outside of the boundingbox. This switch will force
241           palette (256-color) output and make dvipng revert to opaque clipped
242           image inclusion. This will also override the --truecolor switch if
243           present.
244
245       --picky*
246           No images are output when a warning occurs. Normally, dvipng will
247           output an image in spite of a warning, but there may be something
248           missing in this image. One reason to use this option would be if
249           you have a more complete but slower fallback converter. Mainly,
250           this is useful for failed figure inclusion and unknown \special
251           occurrences, but warnings will also occur for missing or unknown
252           color specs and missing PK fonts.
253
254       --png*
255           The images are output in the PNG format. This is the default for
256           the dvipng binary. See also the --gif option.
257
258       -pp firstpage-lastpage
259           Print pages firstpage through lastpage; but not quite equivalent to
260           -p firstpage -l lastpage. For example, when rendering a book, there
261           may be several instances of a page in the DVI file (one in
262           "\frontmatter", one in "\mainmatter", and one in "\backmatter"). In
263           case of several pages matching, -pp firstpage-lastpage will render
264           all pages that matches the specified range, while -p firstpage -l
265           lastpage will render the pages from the first occurrence of
266           firstpage to the first occurrence of lastpage.  This is the
267           (undocumented) behaviour of dvips. In dvipng you can give both
268           kinds of options, in which case you get all pages that matches the
269           range in -pp between the pages from -p to -l. Also multiple -pp
270           options accumulate, unlike -p and -l.  The - separator can also be
271           :. Note that -pp -1 will be interpreted as "all pages up to and
272           including 1", if you want a page numbered -1 (only the table of
273           contents, say) put -pp -1--1, or more readable, -pp -1:-1.
274
275       -q* Run quietly.  Don't chatter about pages converted, etc. to standard
276           output; report no warnings (only errors) to standard error.
277
278       -Q num
279           Set the quality to num. That is, choose the number of antialiasing
280           levels for bitmapped fonts (PK), to be num*num+1. The default value
281           is 4 which gives 17 levels of antialiasing for antialiased fonts
282           from these two. If FreeType is available, its rendering is
283           unaffected by this option.
284
285       -r* Toggle output of pages in reverse/forward order. By default, the
286           first page in the DVI is output first.
287
288       --strict*
289           The program exits when a warning occurs. Normally, dvipng will
290           output an image in spite of a warning, but there may be something
291           missing in this image. One reason to use this option would be if
292           you have a more complete but slower fallback converter. See the
293           --picky option above for a list of when warnings occur.
294
295       -T image_size
296           Set the image size to image_size which can be either of bbox,
297           tight, or a comma-separated pair of dimensions hsize,vsize such as
298           .1in,.3cm. The default is bbox which produces a PNG that includes
299           all ink put on the page and in addition the DVI origin, located 1in
300           from the top and 1in from the left edge of the paper. This usually
301           gives whitespace above and to the left in the produced image. The
302           value tight will make dvipng only include all ink put on the page,
303           producing neat images.
304
305       --truecolor*
306           This will make dvipng generate truecolor output. Note that
307           truecolor output is automatic if you include an external image in
308           your DVI, e.g., via a PostScript special (i.e., the graphics or
309           graphicx package). This switch is overridden by the --palette
310           switch.
311
312       -v* Enable verbose operation. This will currently indicate what fonts
313           is used, in addition to the usual output.
314
315       --width*
316           Report the width of the image. See also --height and --depth.
317
318       -x num
319           This option is deprecated; it should not be used. It is much better
320           to select the output resolution directly with the -D option. This
321           option sets the magnification ratio to num/1000 and overrides the
322           magnification specified in the DVI file.  Must be between 10 and
323           100000.  It is recommended that you use standard magstep values
324           (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help
325           reduce the total number of PK files generated.  num may be a real
326           number, not an integer, for increased precision.
327
328       -z num
329           Set the PNG compression level to num. This option is enabled if
330           your libgd is new enough. The default compression level is 1, which
331           selects maximum speed at the price of slightly larger PNGs. For an
332           older libgd, the hard-soldered value 5 is used. The include file
333           png.h says "Currently, valid values range from 0 - 9, corresponding
334           directly to the zlib compression levels 0 - 9 (0 - no compression,
335           9 - "maximal" compression). Note that tests have shown that zlib
336           compression levels 3-6 usually perform as well as level 9 for PNG
337           images, and do considerably fewer calculations. In the future,
338           these values may not correspond directly to the zlib compression
339           levels."
340

NOTES

342       The full manual is accessible in info format, on most systems by typing
343
344               info dvipng
345
347       This program is released under the GNU Lesser General Public License
348       version 3, see the COPYING file in the dvipng distribution or
349       <http://www.gnu.org/licenses/gpl.html>.
350
351       Copyright (c) 2002-2015, 2019 Jan-AAke Larsson
352
353
354
355dvipng 1.17                       2020-01-05                         DVIPNG(1)
Impressum