Need a special offer?Find out if your project fits.
+
API reference
  • API Reference for older versions
  • Table of contents

    print

    print(options: Object)

    [starting from version: 1.4]

    Prints the current view via the OS print manager. If the current view is the drill-through view, the grid or chart view will be printed instead.

    To learn more about printing, see this guide: Print the report.

    Parameters

    Parameter/Type Description
    options
    Object
    optional Contains printing options.
    options.header
    String
    optional The header is set in HTML format (tags, inline styles, img with base64 src), rendered in the browser and added as an image to the printed PDF file. The following tokens can be used: ##CURRENT-DATE##, ##PAGE-NUMBER##. They will be replaced by appropriate data.
    options.footer
    String
    optional Footer is set in HTML format (tags, inline styles, img with base64 src), rendered in the browser and added as an image to the printed PDF file. The following tokens can be used: ##CURRENT-DATE##, ##PAGE-NUMBER##. They will be replaced by appropriate data.

    Examples

    1) Print the content:

    flexmonster.print();

    Try the example on JSFiddle.

    2) Add header and footer:

    const options = {
      header:"<div>##CURRENT-DATE##</div>",
      footer:"<div>##PAGE-NUMBER##</div>"
    }
    flexmonster.print(options);

    Open the example on JSFiddle.

    See also

    Print tutorial
    printcomplete
    printstart