title: ImageMagick: turn pdf into png, with a transparent background
body: <p>I've a pdf, and I'd like to turn it into a png with the background set to transparent. I tried to do <code>convert -density 300 &quot;in.pdf&quot; -resize 1920x1080 -channel rgba -transparent white &quot;out.png&quot;</code>, unfortunately it is not a great solution as it turns all white to transparent (including white texts), and does not handle properly the gradients:</p>
  <p><a href="https://i.stack.imgur.com/RLmeg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RLmeg.png" alt="enter image description here" /></a></p>
  <p>Any idea how to make it work?</p>
  <p><strong>EDIT</strong></p>
  <p>So I produced this file using beamer... but it seems that beamer adds a white image behind, as with other file produced without beamer I don't have this issue, by default there is no background... If someone knows how to remove the background in beamer, please let me know ;)</p>