[Tex/LaTex] How to make transparent background from pdf to png

latex-2-pngtikz-pgftransparency

I try to convert a latex pdf to png and the background should be transparent.

So I use pdftopng from XpdfReader for windows to convert: (bat-File)

pdflatex Other.tex
pdfcrop Other.pdf
pdftopng -r 300 Other-crop.pdf Other
del Other-crop.pdf

The source is:

\documentclass[border=10pt,tikz]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
  \draw [very thick,fill=green!20!white]
  (-4, 4) circle (2.0cm) node {\textbf{A}};
\end{tikzpicture}

\end{document}

from the example how to remove the background for png picture

with the result:

enter image description here

Is there a way to convert the pdf to a png with a transparent background using pdftopng?

Best Answer

With ImageMagick instead of pdftopng it's simple:

convert -density 300 Other-crop.pdf Other.png

enter image description here