There's an onLoad event on a PDF (sounds vaguely familiar) in which you can
initiate a print.  I've done this on previous projects and works just fine.
I can't recall if I autoclosed that PDF as well but it seems likely.

On 8/20/07, hillj2 <[EMAIL PROTECTED]> wrote:
>
>
> Actually, this is available.  It is possible to embed javascript inside a
> PDF.  It depends on what you're using to generate the PDF however.  I'm
> sure
> Acrobat can do it.  There a library called iText which can.  I think it
> can
> even go into an already created PDF and insert the necessary JS.  We use a
> product called pdflib (not free).  By inserting PDF javascript you can get
> a
> PDF document to print silently (no print dialog).  The trick being you
> have
> to somehow open the PDF first.  In our app we just have a print link that
> generates a PDF and spits it to the printer without the user having to
> even
> see the document first.  We just load the PDF into a hidden IFRAME and on
> the document load the embedded javascript calls the print command.
>
> Do some research on JS for PDFs.  It's been a while since I've dealt with
> that code, so I'm a bit rusty on it.  Also it can be a bit cumbersome to
> get
> it working the way you want it, depending on your exact usecase.  But it
> may
> be just what you're looking for.
>
> Good luck.
>
> Joel
>
>
>
> Martijn Dashorst wrote:
> >
> > Just think about it for 1 minute why this isn't available... (anwser
> > below).
> >
> > Martijn
> >
> >
> >
> > Spam is of all ages, I figure that even in the clay tablet era people
> > would create ads for  enlargements of various body parts (just use a
> > bigger nail!). So before e-mail was the prevalent means of spreading
> > ads, the fax machine (documents sent through the phone line in an
> > analog/copier type of fashion) was churning out forrests of (unwanted)
> > ads.
> >
> > Now imagine a website hosted by Nigerian/Russian/Chinese/Dutch
> > spammers. They would *love* a way to directly print documents without
> > interventioni on the user's part.
> >
> > --
> > Wicket joins the Apache Software Foundation as Apache Wicket
> > Apache Wicket 1.3.0-beta2 is released
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-we-do-straight-print-in-a-java-web-application--tf4289452.html#a12235547
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to