Hi gurus,

So, it's a very simple example. You just have to open the html file 
and...surprise

The pdf also show you that's possible to print several pdf as an answer to a 
single HTTP request (just have a look at the numerotation, I've got my own 
PdfPageEventHelper if you need).

Do you think (Bruno) that the 'totally silent printing' is a security lack?
I think so.


Pascal SIMON

Selon David Pereira <[EMAIL PROTECTED]>:

> Can you send me an complete example, please?
> 
> thanks
> 
> -----Mensaje original-----
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] nombre de SIMON
> Pascal
> Enviado el: lunes, 21 de julio de 2003 15:36
> Para: Bruno Lowagie
> CC: David Pereira; [EMAIL PROTECTED]
> Asunto: Re: [iText-questions] Print document
> 
> 
> I'm afraid you're wrong. I 've already done a silent printing without any
> client confirmation. I just submit a form and the document printing is
> totally
> invisible for the client. You have to configure the target as an iframe with
> some attributes:
> 
> iframe:
> 
> ifrCachee=parent.document.createElement('<iframe name="printPdf"
> id="printPdf"
> src="about:blank" ></iframe>');
> ifrCachee.height = 0;
> ifrCachee.width = 5;
> parent.document.appendChild(ifrCachee);
> 
> width must be >= 5 (why, I don't know) but height can be 0 so...
> invisibility
> 
> in the pdf generation:
> 
> //if acrobat 5.0 or more
> pdf.getWriter().addJavaScript("this.print(false);",false);
> //if acrobat 4.0
> pdf.getWriter().addJavaScript("this.print(false,this.pageNum,
> this.numPages,false);",false);
> 
> I think it's a security lack, but very useful for developers
> 
> Selon Bruno Lowagie <[EMAIL PROTECTED]>:
> 
> > David Pereira wrote:
> >
> > >Can I print a PdfDocument from my servlet with IText?
> > >
> > A Servlet generates HTML/PDF/... that will be shown in a browser/viewer
> > on the client. For security reasons, you can't program a way to print such
> a
> > page automatically on a client printer. You can define an action to open a
> > dialog box, asking the client if he wants to print the page, but that's
> all.
> > If you want to print from a Servlet, you can only print to a printer
> > attached
> > to the server. Carsten Hammer posted some code to do this a while ago
> > (search the mailing list for lpr sources). I didn't have the time yet to
> > look
> > at the code he sent.
> >
> > br,
> > Bruno
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: VM Ware
> > With VMware you can run multiple operating systems on a single machine.
> > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> 
> 
> --
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 


-- 
Title: Real Silent Print

Attachment: numerotation.pdf
Description: Adobe PDF document

Reply via email to