Silent Printing

  • Last update:  2021-12-29
  • I. Overview

    1. Application scenarios

    The user wants to print with a fixed printer every time they print, and do not pop up a dialog box for setting. Now you can set up silent printing.


    2. Function description

    Silent printing, that is, when you click Print, the option window and printer setting window will not pop up, and you can print directly.

    No client printing,Local printing,Server-side printingSupport silent printing.

    II. Use print settings to achieve silent printing

    1. No client printing setting method

    Note: The no client print setting method only supports IE browser.

    Click onTemplates>Print Settings,choose Indivifuallyfor the template.

    CheckNo Client Printing, Check NoPrint settings in IE,As shown below:

    1.png

    After setting, in IE browser, clickPrint buttonYou can print silently.


    2. Local printing setting method

    The user sets the style to be printed in advance in the designer, inherits the paper, layout and margin settings of the template when printing, and no longer pops up the setting window to achieve silent printing.

    1) Settings on the designer side

    Click onTemplates>Print Settings,chooseIndivifuallyfor the template.

    CheckLocal  Printing, CheckShow print setting window when printing,As shown below:

    Note: when uncheck Show print setting window when printingthe predefined default configuration takes precedence over the silent printing setting for local printing.

    2.png

    2) Browser settings

    Preview the template, when you click the button to print, check itSave client settings and perform silent printingpop upSave client settingPop-up window, selectSaveThat's it. As shown below:

    3.png

    After printing is completed, the next time you print, you can perform silent printing according to the saved print settings this time.

    III. Realize silent printing through JS

    1. No client printing JS method

    Note: The no client print setting method only supports IE browser.

    isPopUp : false, // Whether to pop up the setting window, true means to pop up, false means not to pop up                    
    ieQuietPrint : true,// IE silent printing set true to silent, false to not silent
    var printurl="http://localhost:8075/webroot/decision/view/report";

    var
    reportlets ="[{reportlet: 'GettingStarted.cpt', Region: 'North China'}, {reportlet: 'GettingStarted.cpt',

    Region: 'East China'}]";                                                                                        

    var config = {
    printUrl : printurl,
    isPopUp : false
    // Whether to pop up the setting window, true means pop up, false means no pop up
    data :{ 
    reportlets: reportlets // List of templates to be printed
    },
    printType : 0, // Print type, 0 means zero client printing, 1 means local printing
    // The following are the parameters printed by the zero client, which only take effect when printType is 0
    ieQuietPrint : true,// IE silent print setting: true is silent, false is not silent
    };
    FR.doURLPrint(config);

    2. Local printing JS method

    isPopUp : false, // Whether to pop up the setting window, true means pop up, false means not pop up
    var printurl="http://localhost:8075/webroot/decision/view/report";

    var reportlets ="[{reportlet: 'GettingStarted.cpt', Region: 'North China'}, {reportlet: 'GettingStarted.cpt',

    Region: 'East China'}]";

    var config = {
    printUrl : printurl,
    isPopUp : false
    // Whether to pop up the setting window, true means pop up, false means no pop up
    data :{ 
    reportlets: reportlets // List of templates to be printed
    },
    printType : 1, // Print type, 0 means zero client printing, 1 means local printing
    // The following are the parameters for local printing, which only take effect when printType is 1
    printerName : 'Microsoft Print to PDF', // Printer name
    pageType: 2, // Print page number type: 0: all pages, 1: current page, 2: specified page
    pageIndex: '1-3', // Page range. Valid when pageType is 2
    copy: 3, // Number of prints
    };
    FR.doURLPrint(config);


    3. Server-side printing JS method

    In FineReport 10.0, server-side printing can only be called via JS. If the parameter is passed, it will print silently.

    // Silent printing
    window.contentPane.printReportServer({
         pageType: 2// Print page number type: 0: all pages, 1: current page, 2: specified page          
         pageIndex: '1-3'// Page range. Valid when pageType is 2
         printerName: "" // Specify the printer
    });

    For details, see:  Server-side print JS

    Attachment List


    Theme: Report Application
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy