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?

2

1 Answer 1

10

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.

1
  • 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
    Commented Jan 13, 2015 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .