Silent Print From Client side IE RRS feed

  • Question

  • Hi,

    I tried print pdf from browser via javascript.

    it prints with dialog box . i tried to skip this dialog box but failed in doing so.

    i tried several codes like

    1 -- // this also opens dialog box


    function print1()
    if (navigator.appname == "microsoft internet explore")
    var printcommand = '<object id="printcommandobject" width=0 height=0 classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2"></object>';
    document.body.insertadjacenthtml('beforeend', printcommand);
    printcommandobject.outerhtml = "";
    else {

    <button onclick=print1()>Try it</button>

    2-this is second code which i tried

    function btn_print_onclick() {
      factory.printing.header = "This is MeadCo";
      factory.printing.footer = "Printing by ScriptX";
      factory.printing.portrait = false;
      factory.printing.leftMargin = 1.0;
      factory.printing.topMargin = 1.0;
      factory.printing.rightMargin = 1.0;
      factory.printing.bottomMargin = 1.0;

       <button onclick="btn_print_onclick()">Print report</button>

    3 - also tried some links but they also didn't work for me








    any help will be appreciated.



    Monday, July 27, 2015 5:08 PM


  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Visio that one suit of MS Office, I recommend you post the question to the MSDN forum for JS



    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support

    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    • Proposed as answer by George123345 Thursday, August 6, 2015 4:48 AM
    • Marked as answer by George123345 Thursday, August 6, 2015 4:49 AM
    Tuesday, July 28, 2015 2:12 AM