views:

128

answers:

1

Hello there,

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();

Thank you for your time.

Kind regards,
Marius

A: 

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.

Voila.

Thank you for reading.

Kind regards,
Marius

Marius