I want to output a PNG image with the standalone package. Here is a minimal working example:
\documentclass[preview, convert={density=300}]{standalone}
\begin{document}
Hello world
\end{document}
When I inspect the file properties of the resulting PNG file, I still get 72 dpi. Even without using the preview option, it's still at 72 dpi. However, if I convert to JPG using convert={density=300, outext=.jpg}, I'd get 300 dpi.
How can this be fixed? My particular requirement would be to use the preview option and use the PNG image format.


density=600in the options, I getPNG image data, 415 x 58which is twice as the208 x 29that you get from the original input. The typeset "Hello world" is 50.02786pt wide, which corresponds to 0.69224in; 300*0.69224=207.672 that justifies the 208 pixels (and also the 415 at 600dpi). – egreg Nov 13 '12 at 21:34standaloneis using Image Magick or Ghostscript internally. Image Magick is the default under Linux if installed. See the manual section 4.6.2 Conversion software for more details. Also please state yourstandaloneversion, your LaTeX distribution and your OS. – Martin Scharrer♦ Jan 1 at 11:42ghostscriptoption also set. I guess the installation of the OP uses Ghostscript which might cause the issue. – Martin Scharrer♦ Jan 1 at 11:43ghostscript:\documentclass[preview, convert={ghostscript,density=300}]{standalone}givesPNG image data, 208 x 29, 8-bit/color RGB, non-interlaced– egreg Jan 1 at 14:16ghostscriptoption set, even my image viewer does agree about the density. – Qrrbrbirlbel Jan 1 at 19:26