PDF with invalid xref table

Started by RZTitus, March 11, 2019, 02:28:26 PM

Previous topic - Next topic

RZTitus

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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).