Bring your jsreport templates. Leave Chrome behind.
Import your jsreport export as it is. Your app keeps rendering by the same name or shortid, and there is no headless Chrome to keep alive.
Switch in three steps.
- Export from jsreportIn jsreport Studio, export your folders and templates to a .jsrexport file.
- Import into TypefoldDrop the file into Studio. It lists every template and notes anything it had to change.
- Point your app at TypefoldRender by the same name or shortid, with the .NET, Node.js or Python client or plain HTTP.
var client = new TypefoldClient(baseUrl, apiKey);
byte[] pdf = await client.RenderReportAsync(new RenderReportRequest
{
// The shortid your app already stores, or TemplateRef.ByName("Invoice")
Template = TemplateRef.ByShortid("rkJTnK2ce"),
Data = invoice,
});Import again whenever you like: IDs stay the same, and templates you changed in Typefold are never overwritten. How re-imports work
No Chrome to babysit.
jsreport prints with headless Chrome. Its users report memory that "increases linearly with the number of rendered reports and is never reclaimed". Typefold lays out pages with its own engine, so no browser starts for a document.
- Memory after 1,000 renders
- 280 MBChrome reusing one page: 1.4 GB, and growing
- Invoice render speed
- Up to 6×Faster: 24 ms, against 90 to 150 ms in Chrome
- 10,000-row Excel workbook
- 2.6 sFormatted, through the API
Same invoice, same server. Chrome speed is with a new page per document; Chrome memory is with one page reused. All numbers and the method
What comes over.
Templates that use these need no changes.
- Handlebars templateschrome-pdf and xlsx templates, with their helpers and components.
- ScriptsbeforeRender scripts, global and folder scripts, and a subset of Moment.
- Headers and footersChrome's header and footer templates, with page numbers and totals.
- Folders and assetsImages, fonts, stylesheets and workbooks, at the paths templates use.
- pdf-utilsPage groups, form fields and links. Merges become combined templates.
- Signing and passwordsSignature settings, passwords and permissions, and PDF/UA.
- Excel row commandsImported xlsx templates fill the same workbook in the same way.
- Same line breaksArial has the metrics of jsreport's Chrome on Linux, so lines and pages break where they did.
What doesn't.
The import notes every template it skips and every change it makes.
| In jsreport | What to do instead |
|---|---|
| Recipes other than chrome-pdf and xlsx, engines other than Handlebars | Rebuild the template in Studio. |
| afterRender scripts | Do the post-processing in your app after rendering. |
| Other jsreport-proxy calls, such as render or documentStore | Send all the data with the render request. |
| JavaScript in the page, and files fetched from URLs | Prepare data in a script; upload images and fonts. |
| Signing certificates | Upload the .p12 or .pfx file once, under the name the import gives. |
The migration guide has the full list.
And what you get on top.
- Publish without a releaseDrafts, versions and a publish step. Your app only gets what you publish.
- Every environmentPromote templates from test to production in your normal deploy.
- A visual editorLay out new templates on the page, with the real PDF on screen.
- Hosted or self-hostedUse the hosted service, or run the same product on your servers.
Free to start with 100 documents a month. Self-hosted is €990 a year, excluding VAT, with every feature.