dvipng: Raw PostScript
5.3 Raw PostScript
==================
dvipng attempts to handle raw PostScript. Rendering raw PostScript
specials is done on top of the page by including a transparent image
generated by the 'pngalpha' device in GhostScript (automatically
selecting 'truecolor' mode in dvipng).
Included PostScript headers are respected, and if the header
'tex.pro' is included, dvipng also throws in 'color.pro' and
'special.pro'. The package 'xcolor' includes its own headers with color
names, and this is not only kept as a PostScript header, but is also
read and interpreted by dvipng itself. An attempt is also made to
respect the PGF header. The non-rendering specials from 'hyperref' are
handled via some heuristics and do not give an error.
Really rendering and moving things with raw PostScript specials is
more troublesome. The \rotatebox macro serves as a good example. The
dvips driver of the graphicx package surrounds DVI glyphs with
PostScript code so that after conversion by dvips, the glyphs (now
themselves in PostScript) will be rotated in the desired way. dvipng
does not handle this, at present. An attempt has been made to handle
the rendering specials output by PGF (tikz), and also PSTricks. Some
things work, but others do not. This is especially clear when mixing
PostScript and DVI rendering commands such as glyphs. dvipng cannot at
present detect if PostScript code moves 'currentpoint' or rotates the
frame since GhostScript does not return such information. A
recommendation would be to produce images from these packages as EPS
files and include them into your document in the standard manner.
Another way to handle this would be to use a slower fallback (with
dvips and gs, for example). If you want to disable raw PostScript
handling in dvipng, use the switch '--norawps'. This switch turns off
the internal call to GhostScript intended to display these raw
PostScript specials. Further, when dvipng encounters raw PostScript and
the gs call is turned off, it gives a warning. It is now possible to
use the switch '--picky' to disable page rendering of pages with
warnings, and use the slower fallback for these pages.