{"id":18812498,"url":"https://github.com/jsreport/jsreport-chrome-pdf","last_synced_at":"2025-04-13T21:23:47.328Z","repository":{"id":48900455,"uuid":"102137898","full_name":"jsreport/jsreport-chrome-pdf","owner":"jsreport","description":"jsreport recipe using headless chrome for the pdf rendering","archived":false,"fork":false,"pushed_at":"2021-08-20T16:34:06.000Z","size":1123,"stargazers_count":10,"open_issues_count":4,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T11:43:34.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsreport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-01T17:39:02.000Z","updated_at":"2021-08-20T16:34:09.000Z","dependencies_parsed_at":"2022-08-22T10:21:29.566Z","dependency_job_id":null,"html_url":"https://github.com/jsreport/jsreport-chrome-pdf","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-chrome-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-chrome-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-chrome-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-chrome-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsreport","download_url":"https://codeload.github.com/jsreport/jsreport-chrome-pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248783595,"owners_count":21160954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T23:33:48.622Z","updated_at":"2025-04-13T21:23:47.306Z","avatar_url":"https://github.com/jsreport.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**⚠️ This repository has been moved to the monorepo [jsreport/jsreport](https://github.com/jsreport/jsreport)**\n--\n\n# jsreport-chrome-pdf\n[![NPM Version](http://img.shields.io/npm/v/jsreport-chrome-pdf.svg?style=flat-square)](https://npmjs.com/package/jsreport-chrome-pdf)\n[![Build Status](https://travis-ci.org/jsreport/jsreport-chrome-pdf.png?branch=master)](https://travis-ci.org/jsreport/jsreport-chrome-pdf)\n\n\u003e jsreport recipe which is rendering pdf and images from html using headless chrome\n\nSee the docs\n\n- https://jsreport.net/learn/chrome-pdf\n- https://jsreport.net/learn/chrome-image\n\n## Installation\n\n\u003e **npm install jsreport-chrome-pdf**\n\n\n## Usage\nTo use `recipe` in for template rendering set `template.recipe=chrome-pdf` or `template.recipe=chrome-image` according to your needs in the rendering request.\n\nchrome-pdf\n\n```js\n{\n  template: { content: '...', recipe: 'chrome-pdf', engine: '...', chrome: { ... } }\n}\n```\n\nchrome-image\n\n```js\n{\n  template: { content: '...', recipe: 'chrome-image', engine: '...', chromeImage: { ... } }\n}\n```\n\n## jsreport-core\nYou can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)\n\n```js\nvar jsreport = require('jsreport-core')()\njsreport.use(require('jsreport-chrome-pdf')())\n```\n\n## Troubleshooting\n\n#### Table with a lot of rows never finish rendering\n\nWhen rendering a table with a lot of rows (\u003e4000) chrome can hang if the html contains a 5 level of tab indentation in the source, the fix for this is to keep the tab indentation bellow 4 levels. you can take a look at the problem [here](https://playground.jsreport.net/studio/workspace/ByLeJOiIM/7) and see how it is fixed by just updating the indentation [here](https://playground.jsreport.net/studio/workspace/rkvURPi8z/7).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-chrome-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsreport%2Fjsreport-chrome-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-chrome-pdf/lists"}