troubleshooting Question

pdf file not opening

Avatar of TonyReba
TonyRebaFlag for United States of America asked on
PHPAdobe AcrobatJoomla
8 Comments1 Solution409 ViewsLast Modified:
I am able to open the file when testing the web site I created, but some of the users are having the following error:

There was an error opening this document. The file cannot be found.

I tested on my computer which has adobe acrobat pdf pro X , and all works fine, however the users are not being able to open the created pdf file

Any ideas what could be happening?

<?php
/*
Note that this line: /F (http://www.mysite.com/CompletionForm.pdf)
determines the PDF File to be filled in. 
*/

$txtName       = $_GET['txtName'];
$txtCourseName = $_GET['txtCourseName'];
$txtCompletionDate = $_GET['txtCompletionDate'];
//FOR TEST

//echo $txtName;
//echo $txtCourseName;


header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public"); 
header("Cache-Control: private",false); 
header("Content-Description: File Transfer");
header("Content-type: application/vnd.fdf");

echo <<<EOT
%FDF-1.2
1 0 obj
<<
/FDF
<< 
/Fields
[ 
<<
/T (txtName)
/V ({$txtName})
>> 
<<
/T (txtCourseName)
/V ({$txtCourseName})
>> 
<<
/T (txtCompletionDate)
/V ({$txtCompletionDate})
>> 
]
/F (http://appdevelsvr:8080/shquiz/media/certificate/SH_CertificateofCompletion.pdf)

>> 
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
EOT;

?>

Open in new window

ASKER CERTIFIED SOLUTION
Francisco Igor
Software Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros