It seems that you are trying to go beyond what you can control from the server using PHP. Normally, when you use a PDF document you provide a link, the document opens in the browser and then you have the option of printing it.
If you do a search on javascript pdf print you will find posts on what you can do from javascript to handle printing of a PDF. Trying to print multiple PDFs in one go may be a challenge. If that isn't possible / easy, then you might have to live with pre-packaging certain parts of the form together in a discrete number of bundled PDFs. Another approach would be to generate a custom PDF file based on their requested options then just give them a link to open it and use the standard PDF print capability to print it. Doing it that way gives them the option to save it and print it later (may be useful if they use that same version of the form regularly).
If you go for a javascript solution, you will have check for limitations on which Browsers and which versions of the Browsers the code will run in and if it needs the latest Acrobat version installed.
chrishea
Nearly a Posting Virtuoso
1,429 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
Re-Edit :)
<?php
$browser_ver = get_browser(null,true);
if($browser_ver['browser'] == 'IE')
{
?>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pdf print test</title>
<style>
html { height:100%; }
</style>
<script>
function printIt(id){
var pdf = document.getElementById("samplePDF");
pdf.click();
pdf.setActive();
pdf.focus();
pdf.print();
}
</script>
</head>
<body style="margin:0; height:100%;">
<embed id="samplePDF" type="application/pdf" src="Building Flash Web Sites For Dummies.pdf" width="100%" height="100%" />
</body>
</html>
<?php
}
else
{
?>
<HTML>
<script Language="javascript">
function printfile(id)
{
window.frames[id].focus();
window.frames[id].print();
}
</script>
<BODY marginheight="0" marginwidth="0">
<iframe src="Building Flash Web Sites For Dummies.pdf" id="objAdobePrint" name="objAdobePrint" height="95%" width="100%" frameborder=0>
</iframe>
</BODY>
</HTML>
<?php
}
?>
dean8710
Junior Poster in Training
54 posts since Jul 2011
Reputation Points: 7
Solved Threads: 2