sphinx-simplepdf icon indicating copy to clipboard operation
sphinx-simplepdf copied to clipboard

SVG images broken

Open 1kastner opened this issue 8 months ago • 2 comments

When I build the documentation, in docs/_build/simplepdf/_images, among other things, the following image is used:

Image

This, however, looks broken in the resulting PDF:

Image

How can it be fixed?

In addition, how can I make sure that the figure width works?

For completeness, here is the whole file: ConFlowGen.pdf

1kastner avatar Mar 12 '25 12:03 1kastner

Had the same problem with some broken svg. Check the svg code with the code in the index.html , im using the version 1.6 from pypi, and my problem was that in the simplepdf.py line 144 is written "soup.prettify(formatter='html')", that adds newlines and spaces, but based on the svg code, it breaks some format.

Taron686 avatar Nov 11 '25 09:11 Taron686

Thank you, @Taron686, for this analysis!

1kastner avatar Nov 11 '25 15:11 1kastner