8

Sometimes it's impossible to upload .pdf, .dvi and .ps files (usually images of diagrams generated with TiKZ in my case). There, one wishes to obtain a way to export them directly to a .png or some other pic-like file extension. Unfortunately the result I get by taking a snapshot of my .pdf is awful.

Which is the better way to get, say, a .png out of a LaTeX base code?

c.p.
  • 4,636

1 Answers1

9

Yes.You can export the latex output to various formats like .png, .svg , html ...etc.

The convert command from the ImageMagick suite can convert both DVI and PDF files to PNG.

convert input.pdf output.png

EDIT: for a good looking png you should provide a higher density than standard like this: convert -density 300 -quality 90 input.pdf output.png

This wikipedia page gives you a list of other formats.

nidhin
  • 7,932
  • 3
    for a good looking png you should provide a higher density than standard like this: convert -density 300 -quality 90 input.pdf output.png – MaxNoe Jan 13 '15 at 10:41