(Showing Draft Content)


The ActiveReportsJS Viewer provides a print option in the toolbar to print the reports opened in the viewer.

You can also add your own custom print functionality. The following example shows the complete implementation where a custom 'Click to Print' button calls the viewer.print() method from an 'onClick' event.

    <meta charset="utf-8" />    
    <title>ActiveReportsJS Viewer: Printing</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="css/ar-js-viewer.css" />
    <script type="text/javascript" src="scripts/ie-polyfills.js"></script>
    <script type="text/javascript" src="scripts/ar-js-core.js"></script>
    <script type="text/javascript" src="scripts/ar-js-viewer.js"></script>
        var viewer;
<body onload="load()">
<button type="button" onclick="Print()">Click to Print</button>
    <div id="ARJSviewerDiv" style="height: 600px"></div>
        function load() {
            viewer = new ActiveReports.Viewer('#ARJSviewerDiv');
        function Print() {

One-Touch Print

The One-touch print feature of ActiveReportsJS Viewer enables users to print the reports without previewing. So, as you run the application and the viewer finishes loading the report, print dialog is displayed. The following example shows how one-touch print can be implemented using pageDocument.print() method.

function load() {
     //One Touch Printing
     var ARJS = GC.ActiveReports.Core;
     var pageReport = new ARJS.PageReport();
       .then(() => pageReport.run())
       .then(pageDocument => pageDocument.print());


  • Only browser implemented print options are available in the Print dialog.
  • With One-touch printing, you can't send reports directly to printer without displaying the Print dialog.