Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FPDF error: Unable to find "startxref" keyword

Tags:

php

fpdf

I have an app that renders PDFs with FPDF.

It was working fine and for some reasons I had to change the PDF files and now I get this error:

Unable to find "startxref" keyword

enter image description here

If I restore the original files, the same error happens.

How do I fix this error?

like image 865
Mr.Web Avatar asked Aug 28 '15 12:08

Mr.Web


2 Answers

You simply have to pass a local path instead of an URI to setSourceFile().

like image 172
Jan Slabon Avatar answered Sep 25 '22 23:09

Jan Slabon


The problems lies (sometimes) in the pdf compression.

If you are using linux you can use this to uncompress the pdf:

 podofouncompress compressed.pdf decompressed.pdf
like image 32
YOGO Avatar answered Sep 25 '22 23:09

YOGO