{"_id":"@asaje/html-to-pdf","_rev":"4-5eeb189e8986f42994588592600e424e","name":"@asaje/html-to-pdf","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@asaje/html-to-pdf","version":"1.0.0","description":"HTML to PDF tool built with playwright","main":"./dist/pdf.js","types":"./dist/pdf.d.ts","scripts":{"build":"rm -rf dist && tsc"},"keywords":[],"author":"","license":"ISC","devDependencies":{"@playwright/test":"^1.43.1","@types/node":"^20.12.7","esbuild":"^0.20.2","typescript":"^5.4.5"},"dependencies":{"playwright":"^1.43.1"},"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"_id":"@asaje/html-to-pdf@1.0.0","gitHead":"6dabcdd659bdfb33069c64621397eafb2541ac90","bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"homepage":"https://github.com/asaje379/html-to-pdf#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-HrEkb6h2drzEVqD/wH/xWtCPiKwL+eRze6dRQiqzK3vMRGiFFborDtkr2CRgn3Au3vz/5CtO8C9eqRvYs5zInw==","shasum":"71e2a050e32f7d9dec5b7aa0f7e74cea5fa17afb","tarball":"https://registry.npmjs.org/@asaje/html-to-pdf/-/html-to-pdf-1.0.0.tgz","fileCount":7,"unpackedSize":6415,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFrcZWH1pPMnkS8TSuDJUK6Y/l1/mA4Am6yTdaXAj7TjAiAFTCQl0cLNqd0SRKYZ7oNbfeAlYdU7bB3I+Y6vD0Mc4Q=="}]},"_npmUser":{"name":"asaje379","email":"salemaffa@gmail.com"},"directories":{},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-pdf_1.0.0_1714131824258_0.3830218999821948"},"_hasShrinkwrap":false},"1.0.1":{"name":"@asaje/html-to-pdf","version":"1.0.1","description":"HTML to PDF tool built with playwright","main":"./dist/pdf.js","types":"./dist/pdf.d.ts","scripts":{"build":"rm -rf dist && tsc"},"keywords":["html","pdf","html-to-pdf","html to pdf"],"author":"","license":"ISC","devDependencies":{"@playwright/test":"^1.43.1","@types/node":"^20.12.7","esbuild":"^0.20.2","typescript":"^5.4.5"},"dependencies":{"playwright":"^1.43.1"},"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"_id":"@asaje/html-to-pdf@1.0.1","gitHead":"6dabcdd659bdfb33069c64621397eafb2541ac90","bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"homepage":"https://github.com/asaje379/html-to-pdf#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-sALFbcc2ie2dLBSnk7XHU8/T+RVOd0ZAuupx9toOTltEkNWHr8JV4GBPfJnDh2vherrHW9UwEs5vZ3VFBtF7Yw==","shasum":"e19d4e873ef24b6204480f6f307d7f17125497b8","tarball":"https://registry.npmjs.org/@asaje/html-to-pdf/-/html-to-pdf-1.0.1.tgz","fileCount":7,"unpackedSize":6459,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsbZL/ZMTRn4ImNt9WQxaMrltGZ4/PvdhgpnSJegeEPQIgFc09jWp31QVGWoex++MVJWtKdH60rUFffpZ2EyT83h8="}]},"_npmUser":{"name":"asaje379","email":"salemaffa@gmail.com"},"directories":{},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-pdf_1.0.1_1714131925094_0.8918996335575395"},"_hasShrinkwrap":false},"1.0.2":{"name":"@asaje/html-to-pdf","version":"1.0.2","description":"HTML to PDF tool built with playwright","main":"./dist/pdf.js","types":"./dist/pdf.d.ts","scripts":{"build":"rm -rf dist && tsc"},"keywords":["html","pdf","html-to-pdf","html to pdf"],"author":"","license":"ISC","devDependencies":{"@playwright/test":"^1.43.1","@types/node":"^20.12.7","esbuild":"^0.20.2","typescript":"^5.4.5"},"dependencies":{"playwright":"^1.43.1"},"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"_id":"@asaje/html-to-pdf@1.0.2","gitHead":"e29db8bf1fb3faca462d44cec8ae6a8d7a6e5479","bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"homepage":"https://github.com/asaje379/html-to-pdf#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-6LLkXMwrStxHuyVEVFAuJXaMqYssUBllAC6VrBqQsZ/PwBp0Ml5ffl1loCvBHAXVWAF7pqoxS6J6bfym81+l4A==","shasum":"10148f502f2a8fa3eaa5c5fd323c09d344f75f58","tarball":"https://registry.npmjs.org/@asaje/html-to-pdf/-/html-to-pdf-1.0.2.tgz","fileCount":7,"unpackedSize":6457,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEX/TYog0v6ZaGWPYjoD9v7a3sneaC2PMAdmnecsBPv7AiAdXR3PMhmeLV01fWysBu0k21aqjLJIuY7eoQUF31H8NA=="}]},"_npmUser":{"name":"asaje379","email":"salemaffa@gmail.com"},"directories":{},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-pdf_1.0.2_1714132116372_0.7716993289019154"},"_hasShrinkwrap":false},"1.0.3":{"name":"@asaje/html-to-pdf","version":"1.0.3","description":"HTML to PDF tool built with playwright","main":"./dist/pdf.js","types":"./dist/pdf.d.ts","scripts":{"build":"rm -rf dist && tsc"},"keywords":["html","pdf","html-to-pdf","html to pdf"],"author":"","license":"ISC","devDependencies":{"@playwright/test":"^1.43.1","@types/node":"^20.12.7","esbuild":"^0.20.2","typescript":"^5.4.5"},"dependencies":{"playwright":"^1.43.1"},"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"_id":"@asaje/html-to-pdf@1.0.3","gitHead":"dfbd60d3b920f510613cf9b58705b20fe95d11ef","bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"homepage":"https://github.com/asaje379/html-to-pdf#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-wFjXUamxuryzT189wrHRGeUnUEQAPsRZlmb817biQ0iK182luovS+zNWkBIQje4Ut9nSK4bwIBzV3VJ9AHo0qA==","shasum":"474e7850da4d08d8c09f67512858fc0c9a8139d5","tarball":"https://registry.npmjs.org/@asaje/html-to-pdf/-/html-to-pdf-1.0.3.tgz","fileCount":7,"unpackedSize":6470,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnWJF3Hk1pmMZr2BJuL4A8kh6FGi3hWSUOveGe0l4v9AiBDPaGWEV/CPM2rRCnbZn8G9ySh0fQSW/R78SXWogjyAw=="}]},"_npmUser":{"name":"asaje379","email":"salemaffa@gmail.com"},"directories":{},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-pdf_1.0.3_1714132387846_0.4385161507518762"},"_hasShrinkwrap":false},"1.0.4":{"name":"@asaje/html-to-pdf","version":"1.0.4","description":"HTML to PDF tool built with playwright","main":"./dist/pdf.js","types":"./dist/pdf.d.ts","scripts":{"build":"rm -rf dist && tsc"},"keywords":["html","pdf","html-to-pdf","html to pdf"],"author":"","license":"ISC","devDependencies":{"@playwright/test":"^1.43.1","@types/node":"^20.12.7","esbuild":"^0.20.2","typescript":"^5.4.5"},"dependencies":{"playwright":"^1.43.1"},"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"_id":"@asaje/html-to-pdf@1.0.4","gitHead":"baf0f702b866271c334717ba5990bf7fe0e10a8a","bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"homepage":"https://github.com/asaje379/html-to-pdf#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-ljZGXW6TxRiQyuTxha2l4iq3tYLNlefGf6QqyN7NCO3i4F9nJQjpxtjs+N+QRiSxIfdpJnYnn8gwLfg/Dd1Vbg==","shasum":"de917afeac023fd5d36db29c9a58c40d5dcc07d4","tarball":"https://registry.npmjs.org/@asaje/html-to-pdf/-/html-to-pdf-1.0.4.tgz","fileCount":7,"unpackedSize":7142,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID51hXr19dOJRs+Oerht8ZuYaUPxzBDWO3YN+EzK0K2NAiEArvVt0q+5+a+NylLQefQ/NLADvPL9WelQeDsDT9wkkNA="}]},"_npmUser":{"name":"asaje379","email":"salemaffa@gmail.com"},"directories":{},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-pdf_1.0.4_1717584527708_0.7612696700702835"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-26T11:43:44.154Z","1.0.0":"2024-04-26T11:43:44.407Z","modified":"2024-06-05T10:48:48.066Z","1.0.1":"2024-04-26T11:45:25.250Z","1.0.2":"2024-04-26T11:48:36.518Z","1.0.3":"2024-04-26T11:53:08.012Z","1.0.4":"2024-06-05T10:48:47.881Z"},"maintainers":[{"name":"asaje379","email":"salemaffa@gmail.com"}],"description":"HTML to PDF tool built with playwright","homepage":"https://github.com/asaje379/html-to-pdf#readme","keywords":["html","pdf","html-to-pdf","html to pdf"],"repository":{"type":"git","url":"git+https://github.com/asaje379/html-to-pdf.git"},"bugs":{"url":"https://github.com/asaje379/html-to-pdf/issues"},"license":"ISC","readme":"# html-to-pdf\n\nHTML to PDF tool built with playwright\n\n# Installation\n\n```\nnpm install @asaje/html-to-pdf\n```\n\n# Usage\n\n## Generate pdf from html\n\n```ts\nimport { Pdf } from '@asaje/html-to-pdf';\n\nasync function printPdf() {\n  const pdf = new Pdf();\n  await pdf.init();\n  await pdf.printHtml({\n    html: `<div><h1>Test</h1><p>Hello!</p></div>`,\n    options: { path: 'sample.pdf' },\n  });\n  console.log('Pdf generated successfully');\n}\n\nprintPdf();\n```\n\n### printHtml() input object type\n\n```ts\ntype PrintHtmlArgs = {\n  html: string;\n  context?: ContextOptions;\n  options?: PrintOptions;\n};\n\ntype ContextOptions = {\n  timeout?: number;\n  waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';\n};\n\ntype PrintOptions = {\n  displayHeaderFooter?: boolean;\n  footerTemplate?: string;\n  format?: string;\n  headerTemplate?: string;\n  height?: string | number;\n  landscape?: boolean;\n  margin?: {\n    top: string | number;\n    right: string | number;\n    bottom: string | number;\n    left?: string | number;\n  };\n  outline?: boolean;\n  pageRanges?: string;\n  path?: string;\n  preferCSSPageSize?: boolean;\n  printBackground?: boolean;\n  scale?: number;\n  tagged?: boolean;\n  width?: string | number;\n};\n\ntype PageFormat =\n  | 'Letter'\n  | 'Legal'\n  | 'Tabloid'\n  | 'Ledger'\n  | 'A0'\n  | 'A1'\n  | 'A2'\n  | 'A3'\n  | 'A4'\n  | 'A5'\n  | 'A6';\n```\n","readmeFilename":"README.md"}