Copy link to clipboard
Copied
I have a website that holds 23 different PDF's. They all download fine and open correctly when downloading from a Mac computer. They even download and open fine from a Mobile Phone. However my client is getting an error over and over again. I have tested it out and this is what I have come up with.
Error:
Adobe Reader could not open 'filename.pdf'" because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded)
I have resaved the PDF's to be compatible with Reader 6.
Works fine with
All Mac's using either Firefox, Chrome or Safari using Pro and Reader
iPhone downloads using iBook
PC's when downloading from Firefox viewing in Reader 9
PC's when downloading from IE 6.0 view on Reader 8
Error Message When
PC when downloading from IE 7 viewing on Reeder 9
PC when downloading from IE 8 viewing on Reader 9
Here goes the URL when the files resides.
Please help. I can not find a solution.
Copy link to clipboard
Copied
Sounds that you want to read your .pdf files on your Mobile device,maybe iPhone, but failed? If that, you need to know that it is normal, because most of mobile device supports .pdf file veiwing poorly. The right way is to change the format from .pdf to .epub. Hope this would do you some indirections.
Copy link to clipboard
Copied
The problem is my client as well as most others own a PC with IE 7/8 on it. When they download the file they get the above error. It only happens with IE 7/8.
Has anybody else experienced this?
Copy link to clipboard
Copied
When you download the file using IE 7/8 it actually comes over as 0KB. Thus not containing any information. However using the smae computer and downloading the file using Firefox it contains all the information.
Any suggestions?
Copy link to clipboard
Copied
mmm, this does not seem related to Reader as the file is downloaded by IE as 0 bytes whereas other browsers seem to work fine. Reader is invoked after the file has been downloaded. You should also try posting your question in Microsoft's IE forums.
Copy link to clipboard
Copied
Were you able to solve this issue. I am having the same issue now. I have an app which generates reports and sends it as an attachment to senior managers. but they are not able to open the report. We all see the above error you mention.
Copy link to clipboard
Copied
Hi i have solved the ie bug creating the pdf phisically, this is the code i use:
$hostname = "XXXXXX";
$database = "XXXXX";
$username = "XXXXX";
$password = "XXXXXX";
$db = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database, $db);
$query_rs_docs = "SELECT * FROM doc WHERE doc_name='".$_GET['doc_name']."'";
$rs_docs = mysql_query($query_rs_docs, $db) or die(mysql_error());
$row_rs_docs = mysql_fetch_assoc($rs_docs);
$totalRows_rs_docs = mysql_num_rows($rs_docs);
$t_pdf = fopen("/path to doc folder/doc/".$row_rs_docs['doc_name'], "w+");
fwrite($t_pdf, $row_rs_docs['doc_file']);
fclose($t_pdf);
header('Location: http://www.portalesardegna.com/doc/'.$row_rs_docs['doc_name']);
the db table (doc_name must contain the .pdf extension):
CREATE TABLE IF NOT EXISTS `doc` (
`doc_ID` int(10) NOT NULL auto_increment,
`doc_name` varchar(255) NOT NULL,
`doc_file` longblob NOT NULL
PRIMARY KEY (`doc_ID`)
) ENGINE=MyISAM;
Message was edited by: Portale Sardegna