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.
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.
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
North America
Europe, Middle East and Africa
Asia Pacific