Is there a way to make FPDF/FPDI or Zend_Pdf support the parsing of PDFs greater than 1.4?

前端 未结 7 1097
悲哀的现实
悲哀的现实 2020-12-08 12:06

I am trying to add an existing PDF (created otherwise) to a PDF created with FPDF using FPDI. It seems to work find for most PDFs, but I get the following error:

<         


        
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 12:15

    You can use FPDI with TCPDF, it will generate and read (with FPDI) version 1.7 PDFs.

    See TCPDF - PHP class for PDF.


    EDIT

    I have recently been challenged with the issue of using various versions and formats of PDF with FPDI and TCPDF, and I can confirm that PDF versions above 1.4 are hit and miss, the interesting thing is that I have a lot of working 1.7 PDFs, and works about 50/50 on 1.5 and 1.6.

    I worked around the issue by converting all non-workable PDF files to v1.4 using GhostScript which you can exec from the command line. Use ps2pdf14 from the GhostScript lib folder.

提交回复
热议问题