PDF image in PDF document using ReportLab (Python)

前端 未结 4 1634
故里飘歌
故里飘歌 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:37

    According to ReportLab's FAQ this is only possible with ReportLab PLUS:

    Can I use vector graphics in my PDFs?

    No, the Open Source package doesn't do this. PageCatcher (see the previous answer) allows you to easily incorporate any vector image by saving it as a PDF and then using it exactly as you would an image file, and Report Markup Language accepts PDF files along with JPG, GIF and PNG.

    Update: I haven't looked into this for a while but on the page of pdfrw it says:

    pdfrw can read and write PDF files, and can also be used to read in PDFs which can then be used inside reportlab.

提交回复
热议问题