PDF files not Opening in “Document Viewer” - in Ubuntu 20.04.2.0
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:/
and below above warning it further says in a seperate line as under:
“File type unknown (application/
Here, ---- “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/
Please?
Navin Talati (n-m-talati) said : | #2 |
The output is as under:
-------
navin@linux:~$ file /media/navin/WIN-7\ New250GB/Documents\ and\ Settings/
/media/navin/WIN-7 New250GB/Documents and Settings/
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:
-------
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:~$
-------
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:
-------
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
navin@linux:~/Engg Design Seminar June-Aug. 2007/EDS Material CD$
-------
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.