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.
152
153       --gamma num
154           Control the interpolation of colors in the greyscale anti-aliasing
155           color palette.  Default value is 1.0.  For 0 < num < 1, the fonts
156           will be lighter (more like the background), and for num > 1, the
157           fonts will be darker (more like the foreground).
158
159       --gif*
160           The images are output in the GIF format, if GIF support is enabled.
161           This is the default for the dvigif binary, which only will be
162           available when GIF support is enabled. GIF images are palette
163           images (see the --palette option) and does not support true alpha
164           channels (see the --bg option). See also the --png option.
165
166       --height*
167           Report the height of the image. This only works reliably when the
168           LaTeX style preview.sty from preview-latex is used with the active
169           option. It reports the number of pixels from the top of the image
170           to the baseline of the image. The total height of the image is
171           obtained as the sum of the values reported from --height and
172           --depth.
173
174       -l [=]num
175           The last page printed will be the first one numbered num. Default
176           is the last page in the document.  If num is prefixed by an equals
177           sign, then it (and the argument to the -p option, if specified) is
178           treated as a physical (absolute) page number, rather than a value
179           to compare with the TeX \count0 values stored in the DVI file.
180           Thus, using -l =9 will end with the ninth page of the document, no
181           matter what the pages are actually numbered.
182
183       --mode mode
184           This option only has an effect when using bitmapped (PK) fonts. Use
185           mode as the Metafont device name for the PK fonts (both for path
186           searching and font generation). This needs to be augmented with the
187           base device resolution, given with the --bdpi option. See the file
188           <ftp://ftp.tug.org/tex/modes.mf> for a list of resolutions and mode
189           names for most devices.
190
191       -M* This option only has an effect when using bitmapped (PK) fonts. It
192           turns off automatic PK font generation (mktexpk).
193
194       --nogs*
195           This switch prohibits the internal call to GhostScript for
196           displaying PostScript specials. --nogs0 turns the call back on.
197
198       --nogssafer*
199           Normally, if GhostScript is used to render PostScript specials, the
200           GhostScript interpreter is run with the option -dSAFER. The
201           --nogssafer option runs GhostScript without -dSAFER. The -dSAFER
202           option in Ghostscript disables PostScript operators such as
203           deletefile, to prevent possibly malicious PostScript programs from
204           having any effect.
205
206       --norawps*
207           Some packages generate raw PostScript specials, even non-rendering
208           such specials.  This switch turns off the internal call to
209           GhostScript intended to display these raw PostScript specials.
210           --norawps0 turns the call back on.
211
212       -o name
213           Send output to the file name. A single occurrence of %d or %01d,
214           ..., %09d will be exchanged for the physical page number (this can
215           be changed, see the --dvinum switch). The default output filename
216           is file%d.png where the input DVI file was file.dvi.
217
218       -O x-offset,y-offset
219           Move the origin by x-offset,y-offset, a comma-separated pair of
220           dimensions such as .1in,-.3cm.  The origin of the page is shifted
221           from the default position (of one inch down, one inch to the right
222           from the upper left corner of the paper) by this amount.
223
224       -p [=]num
225           The first page printed will be the first one numbered num. Default
226           is the first page in the document.  If num is prefixed by an equals
227           sign, then it (and the argument to the -l option, if specified) is
228           treated as a physical (absolute) page number, rather than a value
229           to compare with the TeX \count0 values stored in the DVI file.
230           Thus, using -p =3 will start with the third page of the document,
231           no matter what the pages are actually numbered.
232
233       --palette*
234           When an external image is included, dvipng will automatically
235           switch to truecolor mode, to avoid unnecessary delay and quality
236           reduction, and enable the EPS translator to draw on a transparent
237           background and outside of the boundingbox. This switch will force
238           palette (256-color) output and make dvipng revert to opaque clipped
239           image inclusion. This will also override the --truecolor switch if
240           present.
241
242       --picky*
243           No images are output when a warning occurs. Normally, dvipng will
244           output an image in spite of a warning, but there may be something
245           missing in this image. One reason to use this option would be if
246           you have a more complete but slower fallback converter. Mainly,
247           this is useful for failed figure inclusion and unknown \special
248           occurrences, but warnings will also occur for missing or unknown
249           color specs and missing PK fonts.
250
251       --png*
252           The images are output in the PNG format. This is the default for
253           the dvipng binary. See also the --gif option.
254
255       -pp firstpage-lastpage
256           Print pages firstpage through lastpage; but not quite equivalent to
257           -p firstpage -l lastpage. For example, when rendering a book, there
258           may be several instances of a page in the DVI file (one in
259           "\frontmatter", one in "\mainmatter", and one in "\backmatter"). In
260           case of several pages matching, -pp firstpage-lastpage will render
261           all pages that matches the specified range, while -p firstpage -l
262           lastpage will render the pages from the first occurrence of
263           firstpage to the first occurrence of lastpage.  This is the
264           (undocumented) behaviour of dvips. In dvipng you can give both
265           kinds of options, in which case you get all pages that matches the
266           range in -pp between the pages from -p to -l. Also multiple -pp
267           options accumulate, unlike -p and -l.  The - separator can also be
268           :. Note that -pp -1 will be interpreted as "all pages up to and
269           including 1", if you want a page numbered -1 (only the table of
270           contents, say) put -pp -1--1, or more readable, -pp -1:-1.
271
272       -q* Run quietly.  Don't chatter about pages converted, etc. to standard
273           output; report no warnings (only errors) to standard error.
274
275       -Q num
276           Set the quality to num. That is, choose the number of antialiasing
277           levels for bitmapped fonts (PK), to be num*num+1. The default value
278           is 4 which gives 17 levels of antialiasing for antialiased fonts
279           from these two. If FreeType is available, its rendering is
280           unaffected by this option.
281
282       -r* Toggle output of pages in reverse/forward order. By default, the
283           first page in the DVI is output first.
284
285       --strict*
286           The program exits when a warning occurs. Normally, dvipng will
287           output an image in spite of a warning, but there may be something
288           missing in this image. One reason to use this option would be if
289           you have a more complete but slower fallback converter. See the
290           --picky option above for a list of when warnings occur.
291
292       -T image_size
293           Set the image size to image_size which can be either of bbox,
294           tight, or a comma-separated pair of dimensions hsize,vsize such as
295           .1in,.3cm. The default is bbox which produces a PNG that includes
296           all ink put on the page and in addition the DVI origin, located 1in
297           from the top and 1in from the left edge of the paper. This usually
298           gives whitespace above and to the left in the produced image. The
299           value tight will make dvipng only include all ink put on the page,
300           producing neat images.
301
302       --truecolor*
303           This will make dvipng generate truecolor output. Note that
304           truecolor output is automatic if you include an external image in
305           your DVI, e.g., via a PostScript special (i.e., the graphics or
306           graphicx package). This switch is overridden by the --palette
307           switch.
308
309       -v* Enable verbose operation. This will currently indicate what fonts
310           is used, in addition to the usual output.
311
312       --width*
313           Report the width of the image. See also --height and --depth.
314
315       -x num
316           This option is deprecated; it should not be used. It is much better
317           to select the output resolution directly with the -D option. This
318           option sets the magnification ratio to num/1000 and overrides the
319           magnification specified in the DVI file.  Must be between 10 and
320           100000.  It is recommended that you use standard magstep values
321           (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help
322           reduce the total number of PK files generated.  num may be a real
323           number, not an integer, for increased precision.
324
325       -z num
326           Set the PNG compression level to num. This option is enabled if
327           your libgd is new enough. The default compression level is 1, which
328           selects maximum speed at the price of slightly larger PNGs. For an
329           older libgd, the hard-soldered value 5 is used. The include file
330           png.h says "Currently, valid values range from 0 - 9, corresponding
331           directly to the zlib compression levels 0 - 9 (0 - no compression,
332           9 - "maximal" compression). Note that tests have shown that zlib
333           compression levels 3-6 usually perform as well as level 9 for PNG
334           images, and do considerably fewer calculations. In the future,
335           these values may not correspond directly to the zlib compression
336           levels."
337

NOTES

339       The full manual is accessible in info format, on most systems by typing
340
341               info dvipng
342
344       This program is released under the GNU Lesser General Public License
345       version 3, see the COPYING file in the dvipng distribution or
346       <http://www.gnu.org/licenses/gpl.html>.
347
348       Copyright (c) 2002-2015 Jan-AAke Larsson
349
350
351
352dvipng (TeX Live) 1.15            2018-03-27                         DVIPNG(1)
Impressum