Silent Printing

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/customerQuoteRe port" + 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

Apparently this is considered a security thing, and there is no
bypass.
Aandi Inston

Similar Messages

  • Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed

    We are planning to Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed. I have tried using the AIR appliaction and it worked, But our requirement is NO INSTALL to the user machine for the silent printing. It is just from web page and silent printing to the default printer to the desktop/Laptop. Can anyone share your thoughts and experience with us. It will be very helpful..
    For AIR : I tried the thread Re: AIR and PDF showing/silent printing

    Hey CodeMonkey & Ross,
    Did you either of you ever find a solution? I'm stuck too, it seems I can get remote printing on all these PDFs to work but it just prints a blank page since I've been using Javascript in the browser, not Adobe's (they are Engineering drawings that I do not have permission to edit so I can't just insert code into them but I need to make work instructions). I've been scouring the internet for hours now, it seems that this thread is the only relevant/useful one at this point. No one else was trying to achieve this for similar reasons to mine.
    Thanks guys,
    Lox

  • How can I/Is it possible to silently print a PDF with specific print settings and obtaining the resulting job id (in windows at least)?

    Greetings,
    I have a specific application for Windows I'm developing where I need to silently print a PDF to a real printer.  The trick is I need to set specific printing preferences ... such as color/monochrome, # of copies, page size / source tray, etc.   The printer is always set to spool documents, and it is key that I know the job id (even if its already done printing) of the resulting print job.
    With windows APIs mixed in, I would imagine something like ...
    OpenPrinter(printername)
    StartDocPrinter(...)
    -----> some SDK call to print the document based on the handles I pass it...or perhaps one page at a time after I call StartPagePrinter()
    EndDocPrinter(...)
    ClosePrinter()
    I've been searching for something for days that would give me this sort of control, but I've been finding the documentation very difficult to find on silently printing a PDF through any means other than a command line which doesn't appear to give me the information or control I need.
    Is this possible with the Adobe SDK? 
    I've seen other posts accomplish this by changing the printing defaults for the printer, and then sending the job silently with a commandline.  This has two problems for me: 1) I still don't know the Job ID of the print job, and 2) I can't rely on the idea that other unrelated print jobs will not be sent while I'm processing the PDF ... making it difficult to use defaults as a means of controlling the settings without causing a lot of side effects.
    Even just a point in the right direction would be a huge help for how I could accomplish this.  
    Thanks a lot,
    Wayne

    You cannot uninstall Kit Kat from your phone. BTW what kind of phone do you have??

  • Adobe 9.3.3 Silent Print issue

    I upgraded from Adobe Acrobat 9.3.2 to 9.3.3. Now when I launch an xfdf to populate it's PDF and pass the print parameters (only occurs when it is a silent print) it does the following:
    The print completes as expected but I receive the following mgs boxes:
    Adobe Acrobat
    Expected a dict object.
    and
    Fatal Error:
    Acrobat failed to send a DDE command.
    The fatal error closes Adobe and requests a Microsoft Error Report.
    This is also happening on Adobe Reader version 9.3.3
    I am on Windows XP Pro version 2002 with service pack 2
    Any ideas?
    Thanks,
    Doug

    Looks like this is not happening outside the several hundred users that have reported this to me.
    Another note: the final fatal error in Reader states:
    Runtime Error!
    C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe
    R6025
    - pure virtual function call
    I submitted a bug report to Adobe but no response.
    Unfortunately our company will have to use a third party viewer and all my JavaScript work will be for nothing.
    Thanks,
    Doug

  • Silent Print and Annoying Printing Security Prompt

    Hello all,
    I finally managed to get my silent print JavaScript to work but I can’t figure out how to get rid of the annoying security prompt "This document is trying to print. Do you want to allow this?". I tried adding the JavaScript folder to the trusted sites under Security (Enhanced) but I am still being nagged with this prompt. Is this feature only for PDF files or can it be used for JavaScript files? I added a button so the user can just click and the PDF document will save in a specified location using PDFCreator. Yes, I know it is strange that I am printing a PDF file to a PDF but I have my reasons. Is it possible to get rid of this message or am I going to have to put up with it. Here is my code:
    function silentprint()
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.printerName = 'PDFCreator';
    this.print(pp);
    function toolbar()
    app.beginPriv();
    app.addToolButton({
    cName: "myToolButton",
    cLabel: "Flatten Active Form",
    cExec: "silentprint();",
    cTooltext: "Click to flatten active form.",
    cEnable: true,
    nPos: 0
    app.endPriv();
    toolbar();

    Hi Shawnny,
    Here are a few points:
    You can (or should be able to) bypass the security warning on your machine.
    There is no way you can set up the doc so other users won't see that warning. Security prefs are on by default.
    Setting up a privileged location should work. Try trusting the file and/or the folder on your machine.
    If that doesn't work, choose to Trust Always from the yellow message bar.
    If that doesn't work, look at the registry and see if you file is indeed trusted for silent printing and JavaScript. Details here: 9   Trust Methods — Acrobat Application Security Guide. Feel free to post your registry prefs here.
    The last option is un-check Enhanced Security in your preferences.
    hth,
    Ben

  • Silent Print Issue

    Dear all,
    I have used javascript silent print command for printing pdf document. This functionality is working fine for last 1 year. Recently my user has reported issue in the functionality. I have checked functionality at my end and its still working fine. When I tried similar on my user's machine, its not working. Only difference which I can make out is that I have only Adobe Reader 9.4.3, where as my user has Adobe Reader 9.4.1 along with writer.
    Can you please help?
    - Is it due to different version fo adobe reader?
    - Is is due to some settings in adobe reader?
    - Does it anything to do with javascript for silent print?
    - Does it related to some windows version / registry settings around default printer?
    Regards,
    Satty

    Hi,
    No error message as such.
    The popup appears "This document is trying to print. do you want to allow this?" and on clicking on "Yes", nothing happens. Where as in my machine (9.4.3), on clicking "Yes", document is sent to the default printer for printing and it works fine.
    Regards,
    Satish

  • Silent print

    Hi all
    I have the usually problem of the developer : the silent printing!!!
    Then,i have a FOP document and i want to silent printing the pdf,i try some method:
    1) autogenereted PCL(by FOP)
    2)by postscript
    This solution give me horrible results,the print doesn't mantein size,line,image....
    The other solution is to print by the Acrobat Dll ,is works fine but there is two problem
    1)i don't want to use only Acrobat Reader but other reader like Foxit
    2)for simulate the silent print i have to open and close the preview and this give me a beautiful behaviour of the monitor!
    Any solution?

    Not possible. How would you experience if you visit some website and in a sudden the printer prints a bulk of paper without any authorization from you?

  • AIR and PDF showing/silent printing

    Is there a way of showing PDF in an AIR application? What about PDF  silent printing?
    Thanks for any ideas.

    update: using the javascript injection method described in the links above works fine with dynamically created html elements, and will launch the print window for multiple pdfs ..  Below is my jquery code, it's quick and dirty but it works...  I've got a button with the ID #print_list in my html file and a div with the id #pdf_holder to hold the objects.  There is a dynamically created list of links in teh #pdf_target div.
    The callPdfFromJavascript() function assumes that the pdf has the corresponding javascript already loaded.  I have modified this function slightly to include the increment variable allowing each object to have a unique ID.
    See link posted by chris above for the function that goes in the pdf.
    I still need to figure out how to do this without the objects appearing but getting this far makes me happy
    $(document).ready(function() {
         if(air.HTMLLoader.pdfCapability == air.HTMLPDFCapability.STATUS_OK) 
              air.trace( "PDF content can be displayed" );
              //print button
              $('#print_list').click(function() {
                   var i='1';
                   $('#pdfdad_target a').each(function() {
                        var pdfLink = $(this).attr('href');
                        var pdfObjectHtml = '<object id="PDFObj'+ i + '" data="'
                             + pdfLink + '" type="application/pdf"></object>';
                        $('#pdf_holder').html();
                        $('#pdf_holder').append(pdfObjectHtml);
                        air.trace(i);
                        //send message to pdf to print
                        callPdfFunctionFromJavascript('Print', i);
                        i++;
         else 
              air.trace("PDF cannot be displayed. Error code:", HTMLLoader.pdfCapability);
    //function that sends print command to pdf
    function callPdfFunctionFromJavascript(arg, i){
         air.trace('got this far');
         var pdfObjectId = "PDFObj" + i;
         pdfObject = document.getElementById(pdfObjectId);
         air.trace(pdfObjectId);
         try {
              pdfObject.postMessage([arg]);
         catch (e) {
              alert("Error: \n name = " + e.name + "\n message = " + e.message);

  • Can we silently print a PDF file programmatically without opening Adobe Reader using DDE messages

    Hi,
    Can anyone help to solve this.
    I want to silently print a PDF file without opening the Adobe reader window.
    Thanks,
    Chandu. G.

    I would like to do that same thing.  Did you ever find an answer to this question?

  • How to remove security warning from silent print

    Hi everybody,
    All is in the question ...
    From a web application i can print a document but every time that open a popup with a warning. I have to click ok before printing.
    I just like to remove this warning.
    Thank for your help.

    Silent printing can only be triggered from a trusted function (batch/menu scripts or the console). Calling the doc.print() function from anything else will always show the dialog, it's a security feature to prevent malicious files from spooling a billion-page job without the user realizing.

  • How to disable security warning while printing(Silent Print) from Javascript?

    We have a webapplication through which, we are creating a pdf document and trying to print it sliently ("Silent Print").
    Users who are having latest Adobe version, were getting javascript warning message. However, those with older versions able to "Silent Print", without any warning messages.
    How to disable this security warning while printing from Javascript?
    Warning message: "A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?".
    Appreciate for your kind help.
    Thanks.

    It's a security warning so it can't be bypassed by anything within the file.

  • Silent print in AIR application

    hi,
       I am struggling with the problem 2 days now. I created a touch screen app and as the final step, app should print a confirmation for user. Because it is standalon point-of-sale, I don't want any confirmation dialogs etc outside of my application. I have created a PDF file with FxPDF library from Tour de Flex. However, it cannot be printed using PrintJob. So I save the file and then use NativeProcess to call AcroRd32.exe with params to silently print it. The problem is, I cannot install Reader in folder of my choice and I don't want to update application each time new Reader is published. Second thing is, Reader window does not close after print, and I will finish with hundreds of open windows in the background after some time.
      My question is, is it possible to do silent printing in AIR in other ways? It does not have to be PDF, perhaps I could prepare layout of text to print another way. I really appreciate any tip, I've digged up internet for several hours, and haven't found any suitable answer.
    Regards,
    Akeen

    i wrote an article how to open and show and silent print pdfs in Windows and Mac OSX with examples (using native commands):
    http://www.onyrix.com/2012/04/adobe-air-pdf-silent-print-with-acrobat-reader/
    bye
    d
    even if is for Adobe Air you can you native commands examples for any other programming language

  • Reader 9.3.3 Problem with Silent Printing (print but no preview)

    I've posted this in Acrobat Scripting Forum but not one response since 07/02/10 (170 read it but no response).
    Running Windows XP 2002 with Service Pack 3
    After updating from Reader 9.3.2 to 9.3.3 our users a experiencing a fatal error when printing silently (the form prints but you don't see it.)
    Steps:
    1. The server produces a pdf and an associated xfdf.
    2. The xfdf is executed which launches Reader and populates the fields in the pdf. At the same time the xfdf print parameters pass into the pdf
    3. Java Script executes the print parameters and sends the form to the printer without the user needing to do anything.
    4. After the print completes, the next set of pdf / xfdf would normally be processed but Reader 9.3.3 throws the following errors
    * A message box pops up stating Expected a dict object. The user clicks OK
    * The Microsoft Error reporting dialog box pops up. User clicks Send or Don't send either way it goes away.
    * A message box pos up "Microsoft Visual C++ Runtime Library"
         Runtime Error!
         C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
         R6025
         - pure virtual function call
         The user clicks OK
    5. Reader closes
    I checked the Event Log and it states:
         Faulting application acrord32.exe, version 9.3.3.177, faulting module acrord32.dll, version 9.3.3.177, fault address 0x000b271f
    If the user opens the form in preview and prints using the print dialog or clicks the Print button I added (uses same Java Script mentioned above) it prints fine and the next set of pdf / xfdf are processed.
    All users have rolled back to Reader 9.3.2 and the problem went away.
    I hope some one from Adobe is aware of this because there are security patches in Reader 9.3.3 and our clients cannot use our product unless they stay on version 9.3.2. For now all users will have to see if the next Adobe Reader release will fix this.
    By the way. I get the same issue in Adobe Acrobat Professional 9.3.3.
    Thanks,
    Doug

    Abhigyan,
    The Java Script hasn't changed in 2 years. It was developed by an Adobe Partner. Adobe Reader and Acrobat have changed.
    I'll try to step through the script but haven't had much luck in past.
    Here are the lines that Reader likely is throwing the error:
    oDoc.print(pp);
    if ( bCloseNoSave )  oDoc.closeDoc({bNoSave:true});
    As I stated, it works in previous versions of Reader (9.0 through version 9.3.2). The issue began when Adobe released version 9.3.3.
    Doug

  • PDF silent printing

    Hi all
    i have a pdf that i generate with FOP then i want to print it in silent mode.I have try the FOAWTRenderer,PDFBox and the basic javax.print but the results are very far from the Acrobat or Foxit print.
    Any idea for this problem?
    Thanks

    OK, thanks.
    I've decided to convert the PDFs using Flashpaper and it's working well.
    Regards
    Marion

  • How to get silent printing in java

    Hi
    In my swing application, i am taking printing out of the screen. Whenever i am using print, a window print dialog is displayed.
    And i dont want to have print dialog displayed. Should take printouts silently.
    And i want to change page orientation through programming.
    I used setOrientation method of PageFormat class to change page orientation, but doesnt change orientation of page.
    please help...

    I [googled print no dialog|http://www.lmgtfy.com/?q=print+java+no+dialog] which led to an example

Maybe you are looking for

  • Sapsql_like_pattern_too_long - dump?

    Hi, I am getting this short dump. This dump not coming every time this report execute. I am getting this dump once in a while. ABAP/4 Open SQL statement with WHERE ... LIKE and pattern too long. Error analysis An exception occurred. This exception is

  • Problems with Itunes 10.5.1 and Windows 7

    Sirs, yesterday my old pc with Windows XP SP3 was replaced by a new laptop with Windows 7 32 bits. When I tried to install the new version 10.5.1 of itunes show several errors and don't work. I install then the version 10.1.4 and was installed withou

  • Setting the file type in a file field

    Hi, I wonder if any body can help i am new to web application development, I am developing an asp application in dreamweaver 8, A few of my pages contain a file field which has a file browse button at the end of the field which works fine, now i want

  • Products needed for XML Support

    One simple question: If I want to store a XML document into a ORACLE database, which additional Products do I have to install beside the Oracle 8i server.

  • Content of folders in hotmail have disappeared on ipad but are there on other devices, why?

    Content of folders in hotmail have disappeared on ipad but there on other devices, why?