I have a script which creates letters as PDFs dynamically using FPDF. I have been able to get the AutoPrint function working which brings up the print dialog on load.
There is another function on the previous link called AutoPrintToPrinter which is supposed to conditionally allow silent of loud printing.
function AutoPrintToPrinter($server, $printer, $dialog=false)
{
//Print on a shared printer (requires at least Acrobat 6)
$script = "var pp = getPrintParams();";
if($dialog)
$script .= "pp.interactive = pp.constants.interactionLevel.full;";
else
$script .= "pp.interactive = pp.constants.interactionLevel.automatic;";
$script .= "pp.printerName = '\\\\\\\\".$server."\\\\".$printer."';";
$script .= "print(pp);";
$this->IncludeJS($script);
}
I know the printer and server name but nothing happens. Even if i ask for 'loud' printing, I don't even get the dialog box.
I've also looked at the Adobe Tutorials around the matter and have tried the following ammended code
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "Adobe PDF";
this.print(pp);
All with no luck.