5

I am struggling to open an important pdf file I have on my ubuntu 12.04, which is probably created on MS Windows(assuming since it has some formatting issue). When I open the file using a PDF viewer it shows me this error: File type unknown (application/octet-stream) is not supported

I tried to open it using terminal, too. Here is the output:

➜  pdf: gnome-open mypdf.pdf
Error: May not be a PDF file (continuing anyway)
Error (30): Illegal character '{'
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table

➜  pdf:  evince my pdf.pdf    
Error: May not be a PDF file (continuing anyway)
Error (30): Illegal character '{'
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table

Can anybody help me with solving this issue and to fix this?

3
  • 6
    Are you sure the file isn't corrupted? What's the output of pdfinfo <file>.pdf? Jun 19, 2013 at 10:47
  • I see these errors: Error: May not be a PDF file (continuing anyway) Error (30): Illegal character '{' Error: PDF file is damaged - attempting to reconstruct xref table... Error: Couldn't find trailer dictionary Error: Couldn't read xref table
    – Surya
    Jun 19, 2013 at 11:01
  • Being this file corrupted is my nightmare, and I think it's coming true. Just hoping for a way to get the content back. :(
    – Surya
    Jun 19, 2013 at 11:03

1 Answer 1

3

MIME type for a PDF on Ubuntu is application/pdf

but application/octet-stream (meaning any generic binary file) is a sort of catch all for files, and usually requires a file extension to determine what to open it with.

Download the PDF locally and save it as a PDF, making sure there is .pdf at the end.

4
  • I did try to change extension to .pdf, but it seems that there is no other way to get the data back. I think I'll have to live with accepting the fact that the file is corrupted. :(
    – Surya
    Jun 20, 2013 at 7:09
  • And still no one know the solution for this annoying problems? it seems the corrupted or damaged pdf file can't be recovered Mar 5, 2014 at 16:35
  • Maybe some of these methods? superuser.com/questions/278562/…
    – BiggJJ
    Mar 9, 2014 at 11:09
  • I had one .pdf file which generated same message and others indicating - a corrupted file. Unable to open it using LibreOffice components, Google browser, and file reader. Firefox browser was able to open it and it turned out to be a scanned document. Printed it using PDF output printing option. The disadvantage with this is the PDF isn't searchable.
    – Sildeag
    Feb 21, 2022 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .