developer.bitcoin.org icon indicating copy to clipboard operation
developer.bitcoin.org copied to clipboard

Generating PDF: Sphinx can't handle SVG

Open s-tikhomirov opened this issue 4 years ago • 1 comments

I wanted to generate the documentation as a print-friendly PDF. I cloned the repo and ran make latexpdf, but faced an error:

! LaTeX Error: Unknown graphics extension: .svg.

Turns out, Sphinx's PDF generation does not support SVG. I understand that this is the problem of Sphinx, not necessarily this repo. However, generating a PDF for printout may be helpful. Is there a way to enable this? For instance, provide copies of images in PNG? Or add instructions in the readme on how to convert SVG to PNG, or install some plugin for Sphinx that can solve the problem?

s-tikhomirov avatar Oct 01 '20 12:10 s-tikhomirov

i found this in sphinx docs :

SVG to PNG (image rasterized) : https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html?highlight=svg#module-sphinx.ext.imgconverter

SVG to PDF : https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter

Hope that helps.

lodembeep avatar Apr 26 '21 17:04 lodembeep