{"_id":"@aalonzolu/htmlpdf","_rev":"1-4f7f6af4319093d8a73ebaf703de1385","name":"@aalonzolu/htmlpdf","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@aalonzolu/htmlpdf","version":"0.0.2","description":"A library that converts HTML to PDF using Headless Chrome (puppeteer)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/aalonzolu/htmlpdf.git"},"keywords":["html","pdf","converter"],"author":{"name":"Maximilian Brandau"},"license":"MIT","bugs":{"url":"https://github.com/aalonzolu/htmlpdf/issues"},"homepage":"https://github.com/aalonzolu/htmlpdf#readme","dependencies":{"lodash.defaults":"^4.2.0","puppeteer":"^5.2.1"},"gitHead":"a6b6ac37506d058a27511f2506a00ba63a68a9b8","_id":"@aalonzolu/htmlpdf@0.0.2","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-HUgEsZ5y40UW3O1GaWaeVTLff4kvWAH/pHXEyumkuj/kHv9z0+jFandCQFe5Ji6PCrcoopSBYQ++AChNBgq0WA==","shasum":"ccc8b94b726e31673d3828bff197675f8c482924","tarball":"https://registry.npmjs.org/@aalonzolu/htmlpdf/-/htmlpdf-0.0.2.tgz","fileCount":6,"unpackedSize":4947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP0/6CRA9TVsSAnZWagAANQ0P/16H3XEH24UmEtMX250R\n+O9aOLY8e4W7mT+jMPwkuUaL6jaDPrUiUqaLWgJpHOmls904Ft7hHDORLNYd\nPqfHQtogKTwtXFFXop5EYhfnre0Gvr5s3wPqATmmuz2s91DEvuJcW2IhDJs1\nQA1Sj50rynuxJNQ+cOgyhcb36beLE9Q1M/ux1EC3rKht6Go/LdKn+UI49rlv\n6VmHG2UOFHo220mnRRYdFcTWWIsVeHpBjvd7MLjgKE3OYGl7U1On2ZwynZMS\ni70qbIkt6bpbSDeySHR08gcPeHzgmpVgzSqKHG+cUBImQ5GfIkzJgLLfl7Wn\n9Rl9RVVbSJhtcP3oIrydVVSQT70G12VVVcOkaOIbNmbPBfz7AoeNAttC3lsl\ntD3D5w4BuehyWqDiRCbTraIdKE24RheImBLTcnSWWPrrcNJ6BNlCpM6qA8lG\npJOc+hIl3s9peE03Upt8huGdqsUXC8B+fzpK36VswIO/aOdsNs+fbnIc4MmL\nkzAZH7hiaVh6TgJD7MFPLj0ot3UZpSrUhhI32n35n58wNvLrir2rCV1K76qT\nclbjeSCENQdYFtyF7FVgX+Qg94D3l2AClBpoQ3/NpjELQbYL42Xgx1+2OxJV\nuSp2fS8LcgeF/0g/DWjDK17WYweXt0seHPIOHubIDFMCcvCXyzHMYNp3dn6o\nBygk\r\n=spGX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC134thEV8ga1u4ZQ4HOpgJZgyhWDez8Y3fYsHhJxilzAiBhpAyhQHKpcUJt7qpUd7AGxv8q9VYQU228C+Q76j5oCg=="}]},"maintainers":[{"name":"aalonzolu","email":"aalonzolu@gmail.com"}],"_npmUser":{"name":"aalonzolu","email":"aalonzolu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/htmlpdf_0.0.2_1597984762343_0.5997914398778676"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-21T04:39:22.299Z","0.0.2":"2020-08-21T04:39:22.539Z","modified":"2022-04-04T10:55:05.202Z"},"maintainers":[{"name":"aalonzolu","email":"aalonzolu@gmail.com"}],"description":"A library that converts HTML to PDF using Headless Chrome (puppeteer)","homepage":"https://github.com/aalonzolu/htmlpdf#readme","keywords":["html","pdf","converter"],"repository":{"type":"git","url":"git+https://github.com/aalonzolu/htmlpdf.git"},"author":{"name":"Maximilian Brandau"},"bugs":{"url":"https://github.com/aalonzolu/htmlpdf/issues"},"license":"MIT","readme":"# htmlpdf\n\n![npm](https://img.shields.io/npm/v/@mbrandau/htmlpdf.svg) ![npm](https://img.shields.io/npm/dt/@mbrandau/htmlpdf.svg) ![GitHub](https://img.shields.io/github/license/mbrandau/htmlpdf.svg)\n\nA library that converts HTML to PDF using Headless Chrome ([puppeteer](https://github.com/GoogleChrome/puppeteer))\n\n## Gettings started\n\n### Installation\n\n`npm install --save @aalonzolu/htmlpdf`\n\n### Usage\n\nThe following example creates a PDF file of the index.html file.\n```js\nconst fs = require('fs');\nconst htmlPdf = require('@aalonzolu/htmlpdf');\n\n(async () => {\n  const options = {\n    format: 'Letter'\n  };\n  const pupteerOptions = {}\n\n  const pdfBuffer = await htmlPdf(fs.readFileSync('index.html'), options,pupteerOptions);\n  fs.writeFileSync('index.pdf', pdfBuffer); // Write PDF file\n})();\n```\n\n## Documentation\n\n### #htmlPdf(html[, options]) <[Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer)> (async function)\n\nCreates a PDF Buffer of the provided HTML using puppeteer. For available options see the [puppeteer documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions).\n","readmeFilename":"README.md"}