PDF image in PDF document using ReportLab (Python)

前端 未结 4 1636
故里飘歌
故里飘歌 2021-01-17 11:43

I saved some plots from matplotlib into a pdf format because it seems to offer a better quality. How do I include the PDF image into a PDF document using ReportLab? The conv

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-17 12:33

    You can use svg export from matplotlib and use svglib python library to include vector graphics in reportlab generated PDF files. svglib takes a svg file and makes a drawing object that can be directly used in reportlab.

    See also this question for more details: Generating PDFs from SVG input

提交回复
热议问题