{"_id":"html2pdf.js","_rev":"4097910","name":"html2pdf.js","description":"Client-side HTML-to-PDF rendering using pure JS","dist-tags":{"latest":"0.12.1"},"maintainers":[{"name":"ekoopmans","email":""}],"time":{"modified":"2025-12-16T03:05:24.000Z","created":"2017-11-26T05:45:22.414Z","0.12.1":"2025-09-17T02:39:39.586Z","0.12.0":"2025-08-31T04:22:05.629Z","0.11.3":"2025-08-31T04:20:19.730Z","0.11.2":"2025-08-26T06:56:48.427Z","0.11.1":"2025-08-24T00:32:49.137Z","0.11.0":"2025-08-23T02:57:16.710Z","0.10.3":"2025-02-26T05:15:51.354Z","0.10.2":"2024-07-01T04:41:31.537Z","0.10.1":"2021-09-02T03:11:48.443Z","0.10.0":"2021-08-31T06:37:42.010Z","0.9.3":"2021-04-25T12:54:46.781Z","0.9.2":"2020-02-19T14:39:24.569Z","0.9.1":"2018-10-27T08:17:24.554Z","0.9.0":"2018-05-19T18:35:34.166Z","0.8.2":"2017-12-19T12:57:43.574Z","0.8.0":"2017-11-26T05:45:22.414Z"},"users":{},"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"versions":{"0.12.1":{"name":"html2pdf.js","version":"0.12.1","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","types":"./type.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^10.0.0","core-js":"^3.16.0","lit":"^3.3.1","pdfjs-dist":"^5.3.93","rimraf":"^6.0.1","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^6.0.1"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"4bc717ffb0f37aadb36f2c553d162028f80d1d08","_id":"html2pdf.js@0.12.1","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"shasum":"df3dfb4669602ee3ff1d48bd064886896549d9d5","size":1678246,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.12.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.12.1.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.12.1_1758076779358_0.6478753387565175"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-17T02:39:39.586Z","publish_time":1758076779586,"_source_registry_name":"default","_cnpm_publish_time":1758076779586},"0.12.0":{"name":"html2pdf.js","version":"0.12.0","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","types":"./type.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^10.0.0","core-js":"^3.16.0","lit":"^3.3.1","pdfjs-dist":"^5.3.93","rimraf":"^6.0.1","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^6.0.1"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"36b6a13f5d45ff39e7e35b65e5288ad6fc5e98ad","_id":"html2pdf.js@0.12.0","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"97b263fe2f74e95050ce6d5a9a17c47cc2afa831","size":1677689,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.12.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.12.0.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.12.0_1756614125389_0.014605987206008031"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-31T04:22:05.629Z","publish_time":1756614125629,"_source_registry_name":"default","_cnpm_publish_time":1756614125629},"0.11.3":{"name":"html2pdf.js","version":"0.11.3","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","types":"./type.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^10.0.0","core-js":"^3.16.0","lit":"^3.3.1","pdfjs-dist":"^5.3.93","rimraf":"^6.0.1","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^6.0.1"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"2e817bb717113d8c9107e219d39274479a3431ce","_id":"html2pdf.js@0.11.3","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"86bf497d1dbfcb4362cd4a675efcd3ab82a732e5","size":1595148,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.11.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.11.3.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.11.3_1756614019481_0.7173560493077027"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-31T04:20:19.730Z","publish_time":1756614019730,"_source_registry_name":"default","_cnpm_publish_time":1756614019730},"0.11.2":{"name":"html2pdf.js","version":"0.11.2","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^10.0.0","core-js":"^3.16.0","lit":"^3.3.1","pdfjs-dist":"^5.3.93","rimraf":"^6.0.1","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^6.0.1"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"e15047ba14cccef15cbaa4b186a14b970a4bdfc9","_id":"html2pdf.js@0.11.2","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"9bb8a33497af683aaa3c5a5e829bf6aaca4700db","size":1403658,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.11.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.11.2.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.11.2_1756191408214_0.8309117926461849"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-26T06:56:48.427Z","publish_time":1756191408427,"_source_registry_name":"default","_cnpm_publish_time":1756191408427},"0.11.1":{"name":"html2pdf.js","version":"0.11.1","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^8.2.2","core-js":"^3.16.0","lit":"^3.3.1","mocha":"^6.1.4","pdfjs-dist":"^5.3.93","rimraf":"^2.6.2","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"89eef38eb730fedcd298a65df6b5f99215d8b421","_id":"html2pdf.js@0.11.1","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"d5c8ff17529bc8d04ea7229e6c5579a55a24a258","size":1476761,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.11.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.11.1.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.11.1_1755995568871_0.7106512145826647"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-24T00:32:49.137Z","publish_time":1755995569137,"_source_registry_name":"default","_cnpm_publish_time":1755995569137},"0.11.0":{"name":"html2pdf.js","version":"0.11.0","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","@brightspace-ui/core":"^3.156.4","@brightspace-ui/testing":"^1.31.2","@web/dev-server":"^0.4.6","babel-loader":"^8.2.2","core-js":"^3.16.0","lit":"^3.3.1","mocha":"^6.1.4","pdfjs-dist":"^5.3.93","rimraf":"^2.6.2","sinon":"^21.0.0","webpack":"^5.101.0","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","start":"web-dev-server --open demo/ --node-resolve --watch","test":"npm run test:unit && npm run test:vdiff","test:unit":"d2l-test-runner --chrome","test:vdiff":"d2l-test-runner vdiff","test:vdiff:golden":"d2l-test-runner vdiff golden"},"gitHead":"5db3b24e61dc0b9401b122e82d3997d6487f136c","_id":"html2pdf.js@0.11.0","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"508179609ca2bc334bbd6f4708f6dc7db28a2a90","size":1474144,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.11.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.11.0.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.11.0_1755917836448_0.13838206125132246"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-23T02:57:16.710Z","publish_time":1755917836710,"_source_registry_name":"default","_cnpm_publish_time":1755917836710},"0.10.3":{"name":"html2pdf.js","version":"0.10.3","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0","jspdf":"^3.0.0"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","babel-loader":"^8.2.2","chai":"^4.2.0","chai-spies":"^1.0.0","core-js":"^3.16.0","karma":"^6.3.4","karma-chai":"^0.1.0","karma-chai-spies":"^0.1.4","karma-chrome-launcher":"^2.2.0","karma-edge-launcher":"^0.4.2","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^2.0.2","karma-webpack-preprocessor":"github:ekoopmans/karma-webpack-preprocessor#update-2021","mocha":"^6.1.4","pdftest":"^0.3.0","rimraf":"^2.6.2","start-server-and-test":"^1.12.0","webpack":"^5.45.1","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","test":"start-server-and-test test:serve http://localhost:3000 test:run","test:serve":"pdftest serve 3000 ./test/reference/snapshot","test:run":"npx karma start karma.conf.js"},"gitHead":"b7b1ae242085a100ec93333542e607838f29ea91","_id":"html2pdf.js@0.10.3","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"6b7ca3e95afdfcaf2b560821fa59fbd06fdd9236","size":1459256,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.10.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.10.3.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html2pdf.js_0.10.3_1740546951165_0.4617947052231388"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-02-26T05:15:51.354Z","publish_time":1740546951354,"_source_registry_name":"default","_cnpm_publish_time":1740546951354},"0.10.2":{"name":"html2pdf.js","version":"0.10.2","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+ssh://git@github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0","jspdf":"^2.3.1"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","babel-loader":"^8.2.2","chai":"^4.2.0","chai-spies":"^1.0.0","commander":"^7.2.0","core-js":"^3.16.0","karma":"^6.3.4","karma-chai":"^0.1.0","karma-chai-spies":"^0.1.4","karma-chrome-launcher":"^2.2.0","karma-edge-launcher":"^0.4.2","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^2.0.2","karma-webpack-preprocessor":"github:ekoopmans/karma-webpack-preprocessor#update-2021","mocha":"^6.1.4","pdftest":"^0.3.0","rimraf":"^2.6.2","start-server-and-test":"^1.12.0","webpack":"^5.45.1","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","test":"start-server-and-test test:serve http://localhost:3000 test:run","test:serve":"pdftest serve 3000 ./test/reference/snapshot","test:run":"npx karma start karma.conf.js","release":"node ./build-scripts.js release","publish-gh":"node ./build-scripts.js publish-gh"},"gitHead":"11c863b615125616c36d896a8879584b5a79b86e","_id":"html2pdf.js@0.10.2","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"29c0e4cebf2cbde4ed0c2e8abb98eecac22ff66f","size":1424325,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.10.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.10.2.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.10.2_1719808891318_0.5696139342924302"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-01T04:41:31.537Z","publish_time":1719808891537,"_source_registry_name":"default","maintainers":[{"name":"ekoopmans","email":""}],"_cnpm_publish_time":1719808891537},"0.10.1":{"name":"html2pdf.js","version":"0.10.1","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0","jspdf":"^2.3.1"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","babel-loader":"^8.2.2","chai":"^4.2.0","chai-spies":"^1.0.0","commander":"^7.2.0","core-js":"^3.16.0","karma":"^6.3.4","karma-chai":"^0.1.0","karma-chai-spies":"^0.1.4","karma-chrome-launcher":"^2.2.0","karma-edge-launcher":"^0.4.2","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^2.0.2","karma-webpack-preprocessor":"github:ekoopmans/karma-webpack-preprocessor#update-2021","mocha":"^6.1.4","pdftest":"^0.3.0","rimraf":"^2.6.2","start-server-and-test":"^1.12.0","webpack":"^5.45.1","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","test":"start-server-and-test test:serve http://localhost:3000 test:run","test:serve":"pdftest serve 3000 ./test/reference/snapshot","test:run":"npx karma start karma.conf.js","release":"node ./build-scripts.js release","publish-gh":"node ./build-scripts.js publish-gh"},"gitHead":"f6c5e835f420af58bc09262cf2ab310fb0190a79","_id":"html2pdf.js@0.10.1","_nodeVersion":"14.16.1","_npmVersion":"7.11.1","dist":{"shasum":"9363910cca52a54113633e552a726722209a8eed","size":1423798,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.10.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.10.1.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.10.1_1630552308196_0.05539378911811976"},"_hasShrinkwrap":false,"publish_time":1630552308443,"_cnpm_publish_time":1630552308443,"_cnpmcore_publish_time":"2021-12-16T21:45:57.378Z"},"0.10.0":{"name":"html2pdf.js","version":"0.10.0","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0","jspdf":"^2.3.1"},"devDependencies":{"@babel/core":"^7.14.8","@babel/preset-env":"^7.14.8","babel-loader":"^8.2.2","chai":"^4.2.0","chai-spies":"^1.0.0","commander":"^7.2.0","core-js":"^3.16.0","karma":"^6.3.4","karma-chai":"^0.1.0","karma-chai-spies":"^0.1.4","karma-chrome-launcher":"^2.2.0","karma-edge-launcher":"^0.4.2","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^2.0.2","karma-webpack-preprocessor":"github:ekoopmans/karma-webpack-preprocessor#update-2021","mocha":"^6.1.4","pdftest":"^0.3.0","rimraf":"^2.6.2","start-server-and-test":"^1.12.0","webpack":"^5.45.1","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^4.7.2"},"scripts":{"build":"npm run clean && webpack --env=prod","build:analyze":"npm run clean && webpack --env=prod --env=analyzer","clean":"rimraf dist/*","dev":"webpack --env=dev","dev:analyze":"webpack --env=dev --env=analyzer","test":"start-server-and-test test:serve http://localhost:3000 test:run","test:serve":"pdftest serve 3000 ./test/reference/snapshot","test:run":"npx karma start karma.conf.js","release":"node ./build-scripts.js release","publish-gh":"node ./build-scripts.js publish-gh"},"gitHead":"43a2f8bfd622fc586a3e3e935a7651a980c15764","_id":"html2pdf.js@0.10.0","_nodeVersion":"14.16.1","_npmVersion":"7.11.1","dist":{"shasum":"81dd527aea420c8d5910f037acb805dbd6fe7eb3","size":1539925,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.10.0.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.10.0_1630391861750_0.9426967255894663"},"_hasShrinkwrap":false,"publish_time":1630391862010,"_cnpm_publish_time":1630391862010,"_cnpmcore_publish_time":"2021-12-16T21:46:00.810Z"},"0.9.3":{"name":"html2pdf.js","version":"0.9.3","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0-alpha.12","jspdf":"1.4.1"},"devDependencies":{"babel-core":"^6.26.3","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-env":"^1.7.0","commander":"^7.2.0","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","release":"node ./build-scripts.js release","publish-gh":"node ./build-scripts.js publish-gh","prebuild":"npm install && npm run clean"},"gitHead":"9570b2ccdde31e6c5271e965fc5e9fa828c54f68","_id":"html2pdf.js@0.9.3","_nodeVersion":"10.16.0","_npmVersion":"7.11.1","dist":{"shasum":"e7fc6143f748ce253670eaae403987342b66b15c","size":64655,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.9.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.9.3.tgz"},"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.9.3_1619355286672_0.9465381028756521"},"_hasShrinkwrap":false,"publish_time":1619355286781,"_cnpm_publish_time":1619355286781,"_cnpmcore_publish_time":"2021-12-16T21:46:01.228Z"},"0.9.2":{"name":"html2pdf.js","version":"0.9.2","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.js.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"homepage":"https://ekoopmans.github.io/html2pdf.js/","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0-alpha.12","jspdf":"^1.4.1"},"devDependencies":{"babel-core":"^6.26.3","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-env":"^1.7.0","gulp":"^4.0.0","minimist":"^1.2.0","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","release":"gulp release --newversion","publish":"npm publish","publish-gh":"gulp publish-gh","prebuild":"npm install && npm run clean"},"gitHead":"f6ac182936be8be9f7a1309c44bb82aaba9031ba","_id":"html2pdf.js@0.9.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"shasum":"9f6d2b57fcfe48ee6deb42e1b3eb56fe4e3a4b22","size":64673,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.9.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.9.2.tgz"},"maintainers":[{"name":"ekoopmans","email":""}],"_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.9.2_1582123164460_0.2269910597045628"},"_hasShrinkwrap":false,"publish_time":1582123164569,"_cnpm_publish_time":1582123164569,"_cnpmcore_publish_time":"2021-12-16T21:46:01.534Z"},"0.9.1":{"name":"html2pdf.js","version":"0.9.1","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf/issues"},"homepage":"https://github.com/eKoopmans/html2pdf","dependencies":{"es6-promise":"^4.2.5","html2canvas":"^1.0.0-alpha.12","jspdf":"^1.4.1"},"devDependencies":{"babel-core":"^6.26.3","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-env":"^1.7.0","gulp":"^4.0.0","minimist":"^1.2.0","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","stage-release":"gulp stage-release --newversion","release":"gulp release --tagmessage","publish":"npm publish","prebuild":"npm install && npm run clean"},"gitHead":"cd774b7b31e1710b07fd4eb4cd42922a7389aad7","_id":"html2pdf.js@0.9.1","_npmVersion":"6.4.1","_nodeVersion":"9.2.0","_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"dist":{"shasum":"144fbe972848cebaa1cf6f8fa66395422d9aad55","size":24632,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.9.1.tgz"},"maintainers":[{"name":"ekoopmans","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.9.1_1540628244408_0.3344391478161235"},"_hasShrinkwrap":false,"publish_time":1540628244554,"_cnpm_publish_time":1540628244554,"_cnpmcore_publish_time":"2021-12-16T21:46:01.760Z"},"0.9.0":{"name":"html2pdf.js","version":"0.9.0","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf/issues"},"homepage":"https://github.com/eKoopmans/html2pdf","dependencies":{"es6-promise":"^4.1.1","html2canvas":"^1.0.0-alpha.12","jspdf":"^1.3.5"},"devDependencies":{"babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-env":"^1.6.1","gulp":"^3.9.1","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","stage-release":"gulp stage-release --newversion","release":"gulp release --tagmessage","publish":"npm publish","prebuild":"npm install && npm run clean"},"gitHead":"f1b0449b1b3d1cacf1e5474a61f3a3e6a3b46acd","_id":"html2pdf.js@0.9.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"dist":{"shasum":"30976b096da1776f70e17c31d137a1c825a70f2a","size":20649,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.9.0.tgz"},"maintainers":[{"name":"ekoopmans","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js_0.9.0_1526754934082_0.8204417501037284"},"_hasShrinkwrap":false,"publish_time":1526754934166,"_cnpm_publish_time":1526754934166,"_cnpmcore_publish_time":"2021-12-16T21:46:01.993Z"},"0.8.2":{"name":"html2pdf.js","version":"0.8.2","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf/issues"},"homepage":"https://github.com/eKoopmans/html2pdf","dependencies":{"html2canvas":"https://github.com/eKoopmans/html2canvas/tarball/develop","jspdf":"^1.3.5","es6-promise":"^4.1.1"},"devDependencies":{"babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.6.1","gulp":"^3.9.1","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","stage-release":"gulp stage-release --newversion","release":"gulp release --tagmessage","publish":"npm publish","prebuild":"npm install && npm run clean"},"gitHead":"8226c17f662aaa695bebcf07420716a195a841c8","_id":"html2pdf.js@0.8.2","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"dist":{"shasum":"fcea973fec01c2f7d726d88c8424805e831bbef7","size":11266,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.8.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.8.2.tgz"},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js-0.8.2.tgz_1513688263484_0.6021147596184164"},"directories":{},"publish_time":1513688263574,"_hasShrinkwrap":false,"_cnpm_publish_time":1513688263574,"_cnpmcore_publish_time":"2021-12-16T21:46:02.358Z"},"0.8.0":{"name":"html2pdf.js","version":"0.8.0","description":"Client-side HTML-to-PDF rendering using pure JS","main":"dist/require/html2pdf.cjs.js","module":"dist/include/html2pdf.es.js","browser":"dist/html2pdf.js","repository":{"type":"git","url":"git+https://github.com/eKoopmans/html2pdf.git"},"keywords":["javascript","pdf-generation","html","client-side","canvas"],"author":{"name":"Erik Koopmans","email":"erik@erik-koopmans.com","url":"https://www.erik-koopmans.com"},"license":"MIT","bugs":{"url":"https://github.com/eKoopmans/html2pdf/issues"},"homepage":"https://github.com/eKoopmans/html2pdf","dependencies":{"html2canvas":"https://github.com/eKoopmans/html2canvas/tarball/develop","jspdf":"^1.3.5","es6-promise":"^4.1.1"},"devDependencies":{"babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.6.1","gulp":"^3.9.1","rimraf":"^2.6.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"build":"rollup -c","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1","stage-release":"gulp stage-release --newversion","release":"gulp release --tagmessage","prebuild":"npm install && npm run clean"},"gitHead":"fa44417e342b00f76ab2d2c84cef183b17534731","_id":"html2pdf.js@0.8.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"ekoopmans","email":"erik@erik-koopmans.com"},"dist":{"shasum":"128b188b4c373a57d515ada7240b0d1798200565","size":222317,"noattachment":false,"key":"/html2pdf.js/-/html2pdf.js-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/html2pdf.js/download/html2pdf.js-0.8.0.tgz"},"maintainers":[{"name":"ekoopmans","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html2pdf.js-0.8.0.tgz_1511675121853_0.8110101448837668"},"directories":{},"publish_time":1511675122414,"_hasShrinkwrap":false,"_cnpm_publish_time":1511675122414,"_cnpmcore_publish_time":"2021-12-16T21:46:03.277Z"}},"readme":"# html2pdf.js\n\nhtml2pdf.js converts any webpage or element into a printable PDF entirely client-side using [html2canvas](https://github.com/niklasvh/html2canvas) and [jsPDF](https://github.com/MrRio/jsPDF).\n\n## Table of contents\n\n- [Getting started](#getting-started)\n  - [CDN](#cdn)\n  - [Raw JS](#raw-js)\n  - [NPM](#npm)\n  - [Bower](#bower)\n  - [Console](#console)\n- [Usage](#usage)\n  - [Advanced usage](#advanced-usage)\n    - [Workflow](#workflow)\n    - [Worker API](#worker-api)\n- [Options](#options)\n  - [Page-breaks](#page-breaks)\n    - [Page-break settings](#page-break-settings)\n    - [Page-break modes](#page-break-modes)\n    - [Example usage](#example-usage)\n  - [Image type and quality](#image-type-and-quality)\n- [Progress tracking](#progress-tracking)\n- [Dependencies](#dependencies)\n- [Contributing](#contributing)\n  - [Issues](#issues)\n  - [Tests](#tests)\n  - [Pull requests](#pull-requests)\n- [Credits](#credits)\n- [License](#license)\n\n## Getting started\n\n#### CDN\n\nThe simplest way to use html2pdf.js is to include it as a script in your HTML by using cdnjs:\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\" integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>\n```\n\nUsing a CDN URL will lock you to a specific version, which should ensure stability and give you control over when to change versions. cdnjs gives you access to [all past versions of html2pdf.js](https://cdnjs.com/libraries/html2pdf.js).\n\n*Note: [Read about dependencies](#dependencies) for more information about using the unbundled version `dist/html2canvas.min.js`.*\n\n#### Raw JS\n\n You may also download `dist/html2pdf.bundle.min.js` directly to your project folder and include it in your HTML with:\n\n```html\n<script src=\"html2pdf.bundle.min.js\"></script>\n```\n\n#### NPM\n\nInstall html2pdf.js and its dependencies using NPM with `npm install --save html2pdf.js` (make sure to include `.js` in the package name).\n\n*Note: You can use NPM to create your project, but html2pdf.js **will not run in Node.js**, it must be run in a browser.*\n\n#### Bower\n\nInstall html2pdf.js and its dependencies using Bower with `bower install --save html2pdf.js` (make sure to include `.js` in the package name).\n\n#### Console\n\nIf you're on a webpage that you can't modify directly and wish to use html2pdf.js to capture a screenshot, you can follow these steps:\n\n1. Open your browser's console (instructions for different browsers [here](https://webmasters.stackexchange.com/a/77337/94367)).\n2. Paste in this code:\n    ```js\n    function addScript(url) {\n        var script = document.createElement('script');\n        script.type = 'application/javascript';\n        script.src = url;\n        document.head.appendChild(script);\n    }\n    addScript('https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js');\n    ```\n3. You may now execute html2pdf.js commands directly from the console. To capture a default PDF of the entire page, use `html2pdf(document.body)`.\n\n## Usage\n\nOnce installed, html2pdf.js is ready to use. The following command will generate a PDF of `#element-to-print` and prompt the user to save the result:\n\n```js\nvar element = document.getElementById('element-to-print');\nhtml2pdf(element);\n```\n\n### Advanced usage\n\nEvery step of html2pdf.js is configurable, using its new Promise-based API. If html2pdf.js is called without arguments, it will return a `Worker` object:\n\n```js\nvar worker = html2pdf();  // Or:  var worker = new html2pdf.Worker;\n```\n\nThis worker has methods that can be chained sequentially, as each Promise resolves, and allows insertion of your own intermediate functions between steps. A prerequisite system allows you to skip over mandatory steps (like canvas creation) without any trouble:\n\n```js\n// This will implicitly create the canvas and PDF objects before saving.\nvar worker = html2pdf().from(element).save();\n```\n\n#### Workflow\n\nThe basic workflow of html2pdf.js tasks (enforced by the prereq system) is:\n\n```\n.from() -> .toContainer() -> .toCanvas() -> .toImg() -> .toPdf() -> .save()\n```\n\n#### Worker API\n\n| Method       | Arguments          | Description |\n|--------------|--------------------|-------------|\n| from         | src, type          | Sets the source (HTML string or element) for the PDF. Optional `type` specifies other sources: `'string'`, `'element'`, `'canvas'`, or `'img'`. |\n| to           | target             | Converts the source to the specified target (`'container'`, `'canvas'`, `'img'`, or `'pdf'`). Each target also has its own `toX` method that can be called directly: `toContainer()`, `toCanvas()`, `toImg()`, and `toPdf()`. |\n| output       | type, options, src | Routes to the appropriate `outputPdf` or `outputImg` method based on specified `src` (`'pdf'` (default) or `'img'`). |\n| outputPdf    | type, options      | Sends `type` and `options` to the jsPDF object's `output` method, and returns the result as a Promise (use `.then` to access). See the [jsPDF source code](https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992) for more info. |\n| outputImg    | type, options      | Returns the specified data type for the image as a Promise (use `.then` to access). Supported types: `'img'`, `'datauristring'`/`'dataurlstring'`, and `'datauri'`/`'dataurl'`. |\n| save         | filename           | Saves the PDF object with the optional filename (creates user download prompt). |\n| set          | opt                | Sets the specified properties. See [Options](#options) below for more details. |\n| get          | key, cbk           | Returns the property specified in `key`, either as a Promise (use `.then` to access), or by calling `cbk` if provided. |\n| then         | onFulfilled, onRejected | Standard Promise method, with `this` re-bound to the Worker, and with added progress-tracking (see [Progress](#progress) below). Note that `.then` returns a `Worker`, which is a subclass of Promise. |\n| thenCore     | onFulFilled, onRejected | Standard Promise method, with `this` re-bound to the Worker (no progress-tracking). Note that `.thenCore` returns a `Worker`, which is a subclass of Promise. |\n| thenExternal | onFulfilled, onRejected | True Promise method. Using this 'exits' the Worker chain - you will not be able to continue chaining Worker methods after `.thenExternal`. |\n| catch, catchExternal | onRejected | Standard Promise method. `catchExternal` exits the Worker chain - you will not be able to continue chaining Worker methods after `.catchExternal`. |\n| error        | msg                | Throws an error in the Worker's Promise chain. |\n\nA few aliases are also provided for convenience:\n\n| Method    | Alias     |\n|-----------|-----------|\n| save      | saveAs    |\n| set       | using     |\n| output    | export    |\n| then      | run       |\n\n## Options\n\nhtml2pdf.js can be configured using an optional `opt` parameter:\n\n```js\nvar element = document.getElementById('element-to-print');\nvar opt = {\n  margin:       1,\n  filename:     'myfile.pdf',\n  image:        { type: 'jpeg', quality: 0.98 },\n  html2canvas:  { scale: 2 },\n  jsPDF:        { unit: 'in', format: 'letter', orientation: 'portrait' }\n};\n\n// New Promise-based usage:\nhtml2pdf().set(opt).from(element).save();\n\n// Old monolithic-style usage:\nhtml2pdf(element, opt);\n```\n\nThe `opt` parameter has the following optional fields:\n\n|Name        |Type            |Default                         |Description                                                                                                 |\n|------------|----------------|--------------------------------|------------------------------------------------------------------------------------------------------------|\n|margin      |number or array |`0`                             |PDF margin (in jsPDF units). Can be a single number, `[vMargin, hMargin]`, or `[top, left, bottom, right]`. |\n|filename    |string          |`'file.pdf'`                    |The default filename of the exported PDF.                                                                   |\n|pagebreak   |object          |`{mode: ['css', 'legacy']}`     |Controls the pagebreak behaviour on the page. See [Page-breaks](#page-breaks) below.                        |\n|image       |object          |`{type: 'jpeg', quality: 0.95}` |The image type and quality used to generate the PDF. See [Image type and quality](#image-type-and-quality) below.|\n|enableLinks |boolean         |`true`                          |If enabled, PDF hyperlinks are automatically added ontop of all anchor tags.                                |\n|html2canvas |object          |`{ }`                           |Configuration options sent directly to `html2canvas` ([see here](https://html2canvas.hertzen.com/configuration) for usage).|\n|jsPDF       |object          |`{ }`                           |Configuration options sent directly to `jsPDF` ([see here](http://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) for usage).|\n\n### Page-breaks\n\nhtml2pdf.js has the ability to automatically add page-breaks to clean up your document. Page-breaks can be added by CSS styles, set on individual elements using selectors, or avoided from breaking inside all elements (`avoid-all` mode).\n\nBy default, html2pdf.js will respect most CSS [`break-before`](https://developer.mozilla.org/en-US/docs/Web/CSS/break-before), [`break-after`](https://developer.mozilla.org/en-US/docs/Web/CSS/break-after), and [`break-inside`](https://developer.mozilla.org/en-US/docs/Web/CSS/break-inside) rules, and also add page-breaks after any element with class `html2pdf__page-break` (for legacy purposes).\n\n#### Page-break settings\n\n|Setting   |Type            |Default             |Description |\n|----------|----------------|--------------------|------------|\n|mode      |string or array |`['css', 'legacy']` |The mode(s) on which to automatically add page-breaks. One or more of `'avoid-all'`, `'css'`, and `'legacy'`. |\n|before    |string or array |`[]`                |CSS selectors for which to add page-breaks before each element. Can be a specific element with an ID (`'#myID'`), all elements of a type (e.g. `'img'`), all of a class (`'.myClass'`), or even `'*'` to match every element. |\n|after     |string or array |`[]`                |Like 'before', but adds a page-break immediately after the element. |\n|avoid     |string or array |`[]`                |Like 'before', but avoids page-breaks on these elements. You can enable this feature on every element using the 'avoid-all' mode. |\n\n#### Page-break modes\n\n| Mode      | Description |\n|-----------|-------------|\n| avoid-all | Automatically adds page-breaks to avoid splitting any elements across pages. |\n| css       | Adds page-breaks according to the CSS `break-before`, `break-after`, and `break-inside` properties. Only recognizes `always/left/right` for before/after, and `avoid` for inside. |\n| legacy    | Adds page-breaks after elements with class `html2pdf__page-break`. This feature may be removed in the future. |\n\n#### Example usage\n\n```js\n// Avoid page-breaks on all elements, and add one before #page2el.\nhtml2pdf().set({\n  pagebreak: { mode: 'avoid-all', before: '#page2el' }\n});\n\n// Enable all 'modes', with no explicit elements.\nhtml2pdf().set({\n  pagebreak: { mode: ['avoid-all', 'css', 'legacy'] }\n});\n\n// No modes, only explicit elements.\nhtml2pdf().set({\n  pagebreak: { before: '.beforeClass', after: ['#after1', '#after2'], avoid: 'img' }\n});\n```\n\n### Image type and quality\n\nYou may customize the image type and quality exported from the canvas by setting the `image` option. This must be an object with the following fields:\n\n|Name        |Type            |Default                       |Description                                                                                  |\n|------------|----------------|------------------------------|---------------------------------------------------------------------------------------------|\n|type        |string          |'jpeg'                        |The image type. HTMLCanvasElement only supports 'png', 'jpeg', and 'webp' (on Chrome).       |\n|quality     |number          |0.95                          |The image quality, from 0 to 1. This setting is only used for jpeg/webp (not png).           |\n\nThese options are limited to the available settings for [HTMLCanvasElement.toDataURL()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL), which ignores quality settings for 'png' images. To enable png image compression, try using the [canvas-png-compression shim](https://github.com/ShyykoSerhiy/canvas-png-compression), which should be an in-place solution to enable png compression via the `quality` option.\n\n## Progress tracking\n\nThe Worker object returned by `html2pdf()` has a built-in progress-tracking mechanism. It will be updated to allow a progress callback that will be called with each update, however it is currently a work-in-progress.\n\n## Dependencies\n\nhtml2pdf.js depends on the external packages [html2canvas](https://github.com/niklasvh/html2canvas) and [jsPDF](https://github.com/MrRio/jsPDF). These dependencies are automatically loaded when using NPM or the bundled package.\n\nIf using the unbundled `dist/html2pdf.min.js` (or its un-minified version), you must also include each dependency. Order is important, otherwise html2canvas will be overridden by jsPDF's own internal implementation:\n\n```html\n<script src=\"jspdf.min.js\"></script>\n<script src=\"html2canvas.min.js\"></script>\n<script src=\"html2pdf.min.js\"></script>\n```\n\n## Contributing\n\n> [!TIP]\n> Working on html2pdf.js locally? Use `npm start` to host local demos on http://localhost:8000.\n\n### Issues\n\nWhen submitting an issue, please provide reproducible code that highlights the issue, preferably by creating a fork of [this template jsFiddle](https://jsfiddle.net/u6o6ne41/) (which has html2pdf.js already loaded). Remember that html2pdf.js uses [html2canvas](https://github.com/niklasvh/html2canvas) and [jsPDF](https://github.com/MrRio/jsPDF) as dependencies, so it's a good idea to check each of those repositories' issue trackers to see if your problem has already been addressed.\n\n#### Known issues\n\n1. **Rendering:** The rendering engine html2canvas isn't perfect (though it's pretty good!). If html2canvas isn't rendering your content correctly, I can't fix it.\n    - You can test this with something like [this fiddle](https://jsfiddle.net/eKoopmans/z1rupL4c/), to see if there's a problem in the canvas creation itself.\n\n2. **Node cloning (CSS etc):** The way html2pdf.js clones your content before sending to html2canvas is buggy. A fix is currently being developed - try out:\n    - direct file: Go to [html2pdf.js/bugfix/clone-nodes-BUILD](/eKoopmans/html2pdf.js/tree/bugfix/clone-nodes-BUILD) and replace the files in your project with the relevant files (e.g. `dist/html2pdf.bundle.js`)\n    - npm: `npm install eKoopmans/html2pdf.js#bugfix/clone-nodes-BUILD`\n    - Related project: [Bugfix: Cloned nodes](https://github.com/eKoopmans/html2pdf.js/projects/9)\n\n3. **Resizing:** Currently, html2pdf.js resizes the root element to fit onto a PDF page (causing internal content to \"reflow\").\n    - This is often desired behaviour, but not always.\n    - There are plans to add alternate behaviour (e.g. \"shrink-to-page\"), but nothing that's ready to test yet.\n    - Related project: [Feature: Single-page PDFs](https://github.com/eKoopmans/html2pdf.js/projects/1)\n\n4. **Rendered as image:** html2pdf.js renders all content into an image, then places that image into a PDF.\n    - This means text is *not selectable or searchable*, and causes large file sizes.\n    - This is currently unavoidable, however recent improvements in jsPDF mean that it may soon be possible to render straight into vector graphics.\n    - Related project: [Feature: New renderer](https://github.com/eKoopmans/html2pdf.js/projects/4)\n\n5. **Promise clashes:** html2pdf.js relies on specific Promise behaviour, and can fail when used with custom Promise libraries.\n    - Related project: [Bugfix: Sandboxed promises](https://github.com/eKoopmans/html2pdf.js/projects/11)\n\n6. **Maximum size:** HTML5 canvases have a [maximum height/width](https://stackoverflow.com/a/11585939/4080966). Anything larger will fail to render.\n    - This is a limitation of HTML5 itself, and results in large PDFs rendering completely blank in html2pdf.js.\n    - The jsPDF canvas renderer (mentioned in Known Issue #4) may be able to fix this issue!\n    - Related project: [Bugfix: Maximum canvas size](https://github.com/eKoopmans/html2pdf.js/projects/5)\n\n### Tests\n\nhtml2pdf.js performs automatic vdiff (visual difference) comparisons on PDFs generated from a collection of sample HTML files. Contributions of additional test cases are more than welcome - see `test/vdiff/html2pdf.vdiff.js` and `test/reference/*.html` for examples. Some changes may require adding more options to the test harness, `test/util/test-harness.js`.\n\n### Pull requests\n\nIf you want to create a new feature or bugfix, please feel free to fork and submit a pull request! Create a fork, branch off of `main`, and make changes to the `/src/` files (rather than directly to `/dist/`). You can test your changes by rebuilding with `npm run build`.\n\n## Credits\n\n[Erik Koopmans](https://github.com/eKoopmans)\n\n#### Contributors\n\n- [@WilcoBreedt](https://github.com/WilcoBreedt)\n- [@Ranger1230](https://github.com/Ranger1230)\n\n#### Special thanks\n\n- [Sauce Labs](https://saucelabs.com/) for unit testing.\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2017-2019 Erik Koopmans <[http://www.erik-koopmans.com/](http://www.erik-koopmans.com/)>\n","_attachments":{},"homepage":"https://ekoopmans.github.io/html2pdf.js/","bugs":{"url":"https://github.com/eKoopmans/html2pdf.js/issues"},"license":"MIT"}