active-report-generator-node
v1.1.23
Published
Package for generating pdf reports using ActiveReportJS library in the node.js
Downloads
23
Readme
active-report-generator-node
Package for generating pdf reports using ActiveReportJS library in the node.js
Installation
npm i active-report-generator-node
To pass the settings, you need to import the "setGeneratorConfig" function from the
active-report-generator-node package
which takes the port number and license key as arguments.
The port number is the port on which chromium is running.
Example:
setGeneratorConfig({ activeReportPort: 5000, licenseKey: "your license key" });
To generate a PDF report, you need to import the renderPdf function from the active-report-generator-node package
and pass two arguments to it:
- The template in JSON or RDLX-JSON format (required).
- The subreport template in JSON or RDLX-JSON format, if a subreport is used (optional).
Example:
Async function
const pdfData = await renderPdf(template, subTemplate);
Promise
renderPdf(template, subTemplate).then((pdfData) => {
console.log(pdfData);
});
Please note that this approach requires a single domain license
The package uses GrapeCity products.