🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.reader
Article #5338

Silent Printing

#5338
From: jbaker3678
Date: Sat, 06 Sep 2008 19:13
15 lines
1463 bytes
We are creating PDF documents via Java and iText and would like them to do a silent print (i.e with no print dialog box). We add the following javascript to the PDF document:

PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("/home/webopt3/public_html/batesfurniturecompany/reports/customerQuoteReport" + customerQuoteHandler.getCustomerQuoteID() + ".pdf"));
document.open();	
writer.addJavaScript("this.print({bUI: false, bSilent: true, bShrinkToFit: true});");	

When the document is opened everything is fine however we are still receiving the following pop-up confirmation box with the message:

"This document is trying to print. Do you want to allow this?"

Is there anyway to have it print automatically without having this confirmation box pop up?

Thanks in advance for your help!

Jack
Technical Details
Message-ID: <59b668c7.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10273d,ec3b61f3a550244,start
X-Google-Attributes: gid10273d,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: jbaker3678@adobeforums.com
Newsgroups: adobe.reader
Subject: Silent Printing
Message-ID: <59b668c7.-1@webcrossing.la2eafNXanI>
Date: Sat, 6 Sep 2008 12:13:47 -0700
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing