FPDF Error: Cannot find the keyword "startxref"

I have an application that makes PDF files with FPDF .

It worked fine and for some reason I had to change the PDF files and now I get this error:

Unable to find "startxref" keyword

enter image description here

If I restored the original files, the same error will occur.

How to fix this error?

+6
source share
2 answers

You just need to pass the local path instead of the URI in setSourceFile () .

+6
source

I recently ran into this problem. I use TCPDF to merge downloaded PDF files. Curiously, something went wrong when importing some PDF files. Some cases following the error were printed:

Cannot find the keyword "startxref". in pdf_parser -> _ findXref ()

So I tried to solve by opening these PDF files in Google Chrome and saving it as a PDF again. To my surprise, TCPDF will work! I still don't know how this could be, but now I have a workaround.

0
source

All Articles