can't open pdf. error: File type unknown (application/octet-stream) is not supported
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.
![Derrick Mar](https://i.stack.imgur.com/geAZV.jpg?s=256&g=1)
Derrick Mar
About whom? me? Weblog | Github | Twitter | Facebook Questions are sometimes quite questionable.
Updated on September 18, 2022Comments
-
Derrick Mar almost 2 years
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?
-
Eric Carvalho about 11 yearsAre you sure the file isn't corrupted? What's the output of
pdfinfo <file>.pdf
? -
Derrick Mar about 11 yearsI 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
-
Derrick Mar about 11 yearsBeing this file corrupted is my nightmare, and I think it's coming true. Just hoping for a way to get the content back. :(
-
-
Derrick Mar about 11 yearsI 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. :( -
Fakhri Zulkifli over 10 yearsAnd still no one know the solution for this annoying problems? it seems the corrupted or damaged pdf file can't be recovered
-
BiggJJ over 10 yearsMaybe some of these methods? superuser.com/questions/278562/…
-
Sildeag over 2 yearsI 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.