ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: RZTitus on March 11, 2019, 02:28:26 PM

Title: PDF with invalid xref table
Post by: RZTitus on March 11, 2019, 02:28:26 PM
Hi,

I'm using exiftool to read/edit metadata. I have some files which give a warming - Invalid xref table.

Is there anyway to try and recover the file or fix the xref table?

Cheers

Rohit
Title: Re: PDF with invalid xref table
Post by: Phil Harvey on March 11, 2019, 08:58:41 PM
Hi Rohit,

Update to the current version of ExifTool (11.31) if you aren't already using it.

If you are getting this warning with the most recent version, send me a sample PDF giving this warning and I'll take a look.  (philharvey66 at gmail.com)

- Phil
Title: Re: PDF with invalid xref table
Post by: Phil Harvey on March 12, 2019, 07:54:33 AM
Hi Rohit,

I got the samples, thanks.

Indeed, the XREF tables at the end of these files have been either truncated or scrambled.

The only thing I don't understand is why Adobe Reader opens these files without any problems.  I can save one file from Adobe Reader and the resulting PDF is OK.  I can't save the other one because apparently it is read-only (dumb PDF security features).

At any rate, ExifTool is correct in not writing these files because there is a significant problem with the file that could result in further data loss.

- Phil