pattersonr
asked on
Prevent new pdf window and/or close submit connection without extra prompts
Hello all. I have been able to submit a pdf file to a web server using the php code below.
<?php
$fptr = fopen("C:\php\blah.pdf", "w");
fputs($fptr, $HTTP_RAW_POST_DATA);
fclose($fptr);
?>
However, when using this code. The pdf submits correctly, but it opens a new pdf ...I think with the website inside the pdf. Because there is no text on the website. I cant really tell what it is doing. However, when I try to close the pdf, I get several warnings about an open data connection and saving the results.
Ideally I dont want those warnings. It will only confuse people.
I wouldnt mind however, if the new pdf opened with the text submission successful and a button to close the file with no additional warnings. I just want this to submit as easily as possible with minimum warnings.
Thanks
<?php
$fptr = fopen("C:\php\blah.pdf", "w");
fputs($fptr, $HTTP_RAW_POST_DATA);
fclose($fptr);
?>
However, when using this code. The pdf submits correctly, but it opens a new pdf ...I think with the website inside the pdf. Because there is no text on the website. I cant really tell what it is doing. However, when I try to close the pdf, I get several warnings about an open data connection and saving the results.
Ideally I dont want those warnings. It will only confuse people.
I wouldnt mind however, if the new pdf opened with the text submission successful and a button to close the file with no additional warnings. I just want this to submit as easily as possible with minimum warnings.
Thanks
ASKER
krkremer,
Good to have you back :) Ok I was able to add some html as a title and that now shows up in the pdf document. So now there is a single line that says Submission Successful. When I try to close the new pdf. I get a save yes/no prompt. I dont suppose there is a way to stop that?
Good to have you back :) Ok I was able to add some html as a title and that now shows up in the pdf document. So now there is a single line that says Submission Successful. When I try to close the new pdf. I get a save yes/no prompt. I dont suppose there is a way to stop that?
Only the full Adobe Acrobat application will prompt to save the file, Reader (because it cannot save the file) will just close it. As far as I know, there is no way to not show that dialog.
[Was not really ready to submit yet]
... at least not when you have Acrobat create the PDF file for you. Try to provide a PDF file from the server. In this case, the document does not need to be converted by Acrobat, and you may not get the save dialog.
... at least not when you have Acrobat create the PDF file for you. Try to provide a PDF file from the server. In this case, the document does not need to be converted by Acrobat, and you may not get the save dialog.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok thanks Kremer I appreciate all your help
When you submit a form, you want some confirmation that your form was successfully submitted - on the web, you would get a page that confirms that, with Acrobat, Adobe expects you to provide a PDF that would indicate that. You can actually just send a text response, and Acrobat will turn that into a PDF file.
Try to send something back, just so that you can see more than just a blank page. This may get rid of the warnings (or it may not...).