Reputation: 219
I want to open a PDF-print dialog (not regular browser dialog) without visually opening the document so that I can print a pdf without having the header and footer information from a regular webpage print.
I know this is possible, because I have seen it in the past on a postal service website for printing postage labels, but cannot remember where.
As far as I know, printing it from an iframe doesnt work, as it only opens regular browser print dialog and gives me ugly page and url information:
frames['name'].focus();
frames['name'].print();
Upvotes: 1
Views: 3920
Reputation: 219
I found this:
http://www.fpdf.org/en/script/script36.php
I embedded that in an invisible iframe. It prints onload, and the PDF stays invisible.
Upvotes: 3