We help IT Professionals succeed at work.
Get Started

pdf file not opening

TonyReba
TonyReba asked
on
405 Views
Last Modified: 2012-05-11
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

Comment
Watch Question
Software Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE