Adding a Font to the Resource

Fonts can be embedded into the report as resources so exported files render identically on any server.

Exporting a Report to HTML

Render the report in Node.js and export it directly from code, without opening the viewer.

Exporting a Report to PDF

Reports can be rendered and exported to PDF entirely on the server. This example renders a template and writes the PDF to a file.

Loading a Report and Rendering it with a JSON Data

On Node.js the Stimulsoft engine runs server-side through the stimulsoft-reports-js package.

Loading a Report and Saving a Rendered Report

Handle the save action in Node.js and store or return the updated report template.

Loading a Report from the Server-Side

A common pattern is to render a report on the Node.js server and send the finished document to a viewer running in the browser.

Registering a Fonts Folder

On the server you can point the engine to a folder of font files so all of them become available to reports.

Starting SQL adapters from the HTTP server

Reports.JS can connect to SQL databases (MySQL, PostgreSQL, MS SQL and others) through a small Node.js data-adapter service.

Supply Custom Headers for Json Database

When a report loads data from a protected JSON endpoint, you may need to send authentication headers.

Using a Custom Font

A single custom font file can be added to the engine and used in a report. This example loads one font and embeds it in the exported PDF.

Using a Report Cache Mode

For very large reports, cache mode keeps memory usage low by holding only part of the rendered document in memory at a time.

Using with Express

Use Node.js code to use with express, with the required setup kept alongside the main API calls.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.