I have created a tikz picture as a standalone.

Can I export the tex file as an image instead of as a pdf?

  • 4
    No, but you can easily convert the pdf to jpg or png. – Johannes_B Oct 26 '15 at 13:55
  • A couple possible solutions are discussed in tex.stackexchange.com/a/11880/55879. – Arun Debray Oct 26 '15 at 13:59
  • standalone provides convert option. For this you will need imagemagick installed. – user11232 Oct 26 '15 at 14:04
  • Or you can directly convert it using imagemagick → convert -density 300 yourfile.pdf yourfile.png (or .jpg whatever) – user11232 Oct 26 '15 at 15:37
  • QTikZ is a nice editor cum preview pane and offers export to PNG – vaettchen Oct 26 '15 at 17:29

I achieved the best results with pdftoppm, the anti-aliasing is much better than imagemagicks convert.

Just do:

$ pdftoppm -png -r <dpi> document.pdf > document.png

I usually use 300 or 600 dpi.

pdftoppm comes with poppler (package poppler-utils on Ubuntu).


If you are using Texmaker, right-click on the pdf, then choose convert page to png image choice. Note: if you intend to include this image in your tex file, then you can include the pdf directly. As a matter of fact, the quality of the pdf is better than converting the pdf to an image.

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.