Closed zousiyu1995 closed 1 year ago
What version of dvisvgm and Ghostscript do you use (see output of dvisvgm -V1
)? In order to convert opacity values correctly, you need at least Ghostscript 9.52. Earlier versions don't provide PS operators to retrieve these values from PS/PDF files.
If you use GS 9.56.1, have a look at the FAQ to get information on how to handle the latest changes to its PDF interpreter.
For example, I used the tikz package to generate a PDF file, and the fill opacity was used in the tikz. Then, the command
dvisvgm.exe --pdf -n main.pdf
was used to convert the PDF file to an SVG file. I found the SVG file is empty. There is nothing!The minimum working example of tikz code is shown as,
The generated PDF file is shown as,![image](https://user-images.githubusercontent.com/7608449/188531283-d2aa8a3c-d316-4887-b20f-59a1263a47ae.png)
But, I can use![image](https://user-images.githubusercontent.com/7608449/188531188-146ea7c9-f242-4931-9b7a-f2681325183a.png)
inkscape
to convert this PDF file to an SVG file successfully. The inscape command isinkscape.exe main.pdf --pdf-poppler -o main.svg
. The generated SVG is shown as,Why
dvisvgm
can't convert a PDF file with an opacity value?