gegl:pdf-load does not respect background transparency
Tested with GEGL 0.4.46
Hello,
The gegl:pdf-load
operation does not respect background transparency. Yes, PDF files can have transparent background (one does not necessarily print on white paper; besides, the PDF format can be used for images, vector input for TeX4ht, etc. — all cases where preserving background transparency is important).
Using the attached example.pdf file (which features a black disc over a fully transparent background), the following command:
gegl -- gegl:pdf-load path=example.pdf ppi=300 gegl:png-save path=output.png
produces without-patch.png featuring a black disc over a white, opaque background. After applyingpdf-load-with-transparent-background.patch, the same command produces with-patch.png which, as expected has a transparent background behind the black disc.
Thanks for considering and, even if you decide to fix the problem in a different way, for allowing users to preserve background transparency of input PDF files.
Note: example.pdf has been obtained by compiling the following LaTeX code with pdflatex
:
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}
\fill circle[radius=1cm];
\end{tikzpicture}
\end{document}