I need to print pdf silently
in kiosk
.
So far I was printing webpage and it worked fine:
//print plugin
<script src="js/jQuery-printPage-plugin/jquery.printPage.js" type="text/javascript"></script>
//definition
$(".btnPrint").printPage({
url: "adres of page to print",
attr: "href",
message:"Please wait."
});
$(".btnPrint").trigger("click"); //I simulate user clicking print button
(Also I added silent print in firefox about:config to hide print dialog. (similar to chrome --kiosk-printing))
The problem is that pdf won't print
.
SecurityError: Permission denied to access property "print" on cross-origin object
I don't need to use this plugin, any working plugin will be ok. I have found a lot of stuff all over the internet concerning the problem, but none is work for me - I tried various solutions in chrome/ff 1) creating new window (won't include pdf directly, need to use iframe/embed), printing via object or iframe. 2) On chrome I cant even get pdf printed from iframe at all (I get blank iframe) 3) firefox I can't print iframe contents with pdf inside (whole page that contain pdf will print, but I multiple page pdf will be cropped).
Please have in mind that I'm in total control of the kiosk (windows 7), and I can use any browser, install any additional software.