Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 show me this error: File type unknown (application/octet-stream) is not supported

I tried to open it using console, 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?

Thanks Surya

share|improve this question
4  
Are you sure the file isn't corrupted? What's the output of pdfinfo <file>.pdf? –  Eric Carvalho Jun 19 '13 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 '13 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 '13 at 11:03
add comment

1 Answer

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.

share|improve this answer
    
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 '13 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 –  d0lph1n Mar 5 at 16:35
    
Maybe some of these methods? superuser.com/questions/278562/… –  BiggJJ Mar 9 at 11:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.