10

I received a .pdf file from someone on a non-linux machine and when i try to open it it says "Unable to open document. File type Zip archive (application/zip) is not supported". So, I rename it "file.pdf.zip" and open it up with unzip. I then get a zipped folder with a file named "[Content_Types].xml and 3 folders (docProps, _rels, word) with various files inside. None of them are a useable .pdf file.

When I send it back to someone on a non-Linux they can view it fine so I know it isn't corrupted. I need to view the .pdf on my Linux machine. How do I do that?

Note, most .pdf's I receive open fine, just certain ones don't work.

  • 1
    Note that in Linux, the last few characters of the filename is only used by a small minority of programs for discerning the filetype - they're entirely optional, so renaming it ".zip" wasn't needed. Most programs use magic numbers, which is the first few bytes of data in the file itself. Other OSs have used other mechanisms: Mac used to use forks, with a "data fork" for the main payload and a "resource fork" for metadata, AmigaOS used ".info" metadata files; while VMS went much farther than DOS in encoding devices, and versions into the filename. – Rich May 18 at 0:52
  • @Rich: A small minority of programs, including the graphical file browser, you mean. – Kevin May 18 at 18:59
18

This is not a PDF file. This is a Word document. (Well, it's an “Office Open XML” document, but it's Microsoft's format.) These files are zip files under the hood, but the individual files contained in the zip don't make sense on their own.

The person who sent it probably made a mistake when they tried to save it as a PDF, and just renamed the file instead of converting it to PDF. If it's practical, let them know that they actually sent a Word document and try to get them to give you a PDF instead.

You can open Word documents in LibreOffice. Try renaming the file to .docx and your system will probably do that automatically. Usually you can see the text and some of the formatting, but the compatibility is far from perfect. Some elements may be missing or misplaced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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