PDF files not Opening in “Document Viewer” - in Ubuntu 20.04.2.0

Asked by Navin Talati on 2021-02-20

I have got some old PDF files (..say of July 2007..). These are on a hdd having Win-7 as OS. These are copied from a CD with me to store it. When I open these files by “Document Viewer” a default application (in Ubuntu 20.04.2.0), it gives warning as under:

“........Unable to open document “file:///media/navin/WIN-7 New250GB/Documents and Settings/mayur/Desktop/Engg Design Seminar June-Aug. 2007/EDS Material CD/Compressors.pdf”........”

and below above warning it further says in a seperate line as under:

“File type unknown (application/octet-stream) is not supported”

Here, ---- “file:///media/navin/WIN-7 New250GB/Documents and Settings/mayur/Desktop/Engg Design Seminar June-Aug. 2007/EDS Material CD/Compressors.pdf”------ is just a LOCATION of the file.

Which application should I use to open these files?
 OR
How to rectify this error?

Regards.
Navin Talati / 20-02-2021

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2021-02-24
Last reply:
2021-02-24

What is the output of:

file /media/navin/WIN-7\ New250GB/Documents\ and\ Settings/mayur/Desktop/Engg\ Design\ Seminar\ June-Aug\.\ 2007/EDS\ Material\ CD/Compressors.pdf

Please?

Navin Talati (n-m-talati) said : #2

The output is as under:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
navin@linux:~$ file /media/navin/WIN-7\ New250GB/Documents\ and\ Settings/mayur/Desktop/Engg\ Design\ Seminar\ June-Aug\.\ 2007/EDS\ Material\ CD/Compressors.pdf
/media/navin/WIN-7 New250GB/Documents and Settings/mayur/Desktop/Engg Design Seminar June-Aug. 2007/EDS Material CD/Compressors.pdf: cannot open `/media/navin/WIN-7 New250GB/Documents and Settings/mayur/Desktop/Engg Design Seminar June-Aug. 2007/EDS Material CD/Compressors.pdf' (No such file or directory)
navin@linux:~$
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Manfred Hampl (m-hampl) said : #3

It seems that the path to that file is too complicated for an error-free retyping.

I suggest that you use the file manager program to copy that file into your home directory, and then simply issue the command

file Compressors.pdf
head --bytes=100 Compressors.pdf

Navin Talati (n-m-talati) said : #4

The captioned folder "Engg Design Seminar June-Aug. 2007" copied into home directory.
Then issued above TWO commands. Output is as under:

-----------------------OUT PUT----------------------------------
avin@linux:~$ file Compressors.pdf
Compressors.pdf: cannot open `Compressors.pdf' (No such file or directory)
navin@linux:~$ head --bytes=100 Compressors.pdf
head: cannot open 'Compressors.pdf' for reading: No such file or directory
navin@linux:~$
----------------------------END-----------------------------------------

Does this require some package installation?
How to proceed further?

You'll need to provide the full path to the file or use the cd command (like you do in Windows) to change to the containing directory, then you can run commands. You were told there was no such file because the path that you were in, in the terminal is not the one containing your filem

Manfred Hampl (m-hampl) said : #6

My recommendation was to copy just a single file to your home directory. If you copy the whole directory tree, then this is fine but needs slightly different actions.

I suggest:

Open a terminal window
start typing "cd Engg" and then press the Tab key.
This should add the rest of the directory name.
Then press the enter key.
start typing "cd EDS" and then press the Tab key.
This should add the rest of the directory name.
Then press the enter key.
Next: issue the two commands

file Compressors.pdf
head --bytes=100 Compressors.pdf

and finally copy/paste all output into this question document that we can check.

Navin Talati (n-m-talati) said : #7

Thank you sir for further clarity to me.
The output as per #6 is as under:
----------------------------- OUT PUT-------------------------
navin@linux:~$ cd Engg\ Design\ Seminar\ June-Aug.\ 2007/
navin@linux:~/Engg Design Seminar June-Aug. 2007$ cd EDS\ Material\ CD/
navin@linux:~/Engg Design Seminar June-Aug. 2007/EDS Material CD$ file Compressors.pdf
Compressors.pdf: data
navin@linux:~/Engg Design Seminar June-Aug. 2007/EDS Material CD$ head --bytes=100 Compressors.pdf
�2C^t��XD���gF
              2�TE��[��s��
                          xLY��n�<�5N0u���S��� {-�Lb>Uב:&���t_��Mڶ&�r�R*
navin@linux:~/Engg Design Seminar June-Aug. 2007/EDS Material CD$
-------------------------------END--------------------------------

Manfred Hampl (m-hampl) said : #8

The file contents are not what a PDF (portable document format) file should be.
The first bytes of a PDF file have to be "%PDF", and this is not the case with your file.

It seems that something went wrong with the files.
Do you still have the original CD?

Navin Talati (n-m-talati) said : #9

yes

Manfred Hampl (m-hampl) said : #10

I suggest that you try copying the files from the CD again, if possible.

Can you help with this problem?

Provide an answer of your own, or ask Navin Talati for more information if necessary.

To post a message you must log in.