问题
I use Libreoffice Draw for drawing block diagrams. I export them automatically on the command line using the following command:
soffice --headless --convert-to pdf --outdir figures figures_raw/foo.odg
However, this does not preserve transparency - the background is always white. How to convert odg drawings to pdf but preserver the transparency?
回答1:
However, this does not preserve transparency - the background is always white.
This is so by specification. In the PDF specification, when covering the topic of transparency,
the notion of current page is generalized to refer to a transparency group consisting of the entire stack of objects placed on the page, composited with a backdrop that is pure white and fully opaque.
(section 11.2 Overview of Transparency, ISO 32000-1)
Thus, PDF viewer programs or viewing controls usually will display a PDF with a white, opaque background.
来源:https://stackoverflow.com/questions/32333059/export-pdf-from-draw-document-with-transparency