5

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?

5

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.

  • 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
0

Yes, you can export your file directly to .png format! For this, you can go to Tools->Convert to Html...

There will be several files in folder 'projectname_html' and inside this folder you will find your .png files!

  • 4
    This answer seems to presume that you are using a particular program for editing your TeX files: could you make it clear which program this is? – Seamus Jan 28 '16 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.