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

Asked by Navin Talati

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:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

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?

Revision history for this message
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:~$
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Revision history for this message
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

Revision history for this message
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?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

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

Revision history for this message
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.

Revision history for this message
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--------------------------------

Revision history for this message
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?

Revision history for this message
Navin Talati (n-m-talati) said :
#9

yes

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

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

Revision history for this message
Navin Talati (n-m-talati) said :
#11

Yes, I have again copie3d the CD on the desktop and named it as "EDS Material CD"

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Can the files now be opened, or - if not - what is the output of the "head ..." command on one of these files?

Revision history for this message
Launchpad Janitor (janitor) said :
#13

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.