{"_id":"@archireport/react-native-static-html-to-pdf","_rev":"15-84df8686531198d4af089cf6cdd21d4d","name":"@archireport/react-native-static-html-to-pdf","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@archireport/react-native-static-html-to-pdf","version":"0.2.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/mlecoq","name":"Mickael Lecoq","email":"mickael@lecoq.me"},"license":"MIT","_id":"@archireport/react-native-static-html-to-pdf@0.2.0","maintainers":[{"name":"elnkno","email":"morandi.marc@hotmail.fr"},{"name":"archireportteam","email":"contact@archireport.com"},{"name":"sbos","email":"simon@archireport.com"},{"name":"mlecoq","email":"mkl.lecoq@gmail.com"}],"homepage":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf#readme","bugs":{"url":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf/issues"},"dist":{"shasum":"815acbb54f303408cf821c2e7bcee3ac232b845e","tarball":"https://registry.npmjs.org/@archireport/react-native-static-html-to-pdf/-/react-native-static-html-to-pdf-0.2.0.tgz","fileCount":105,"integrity":"sha512-XlBNxJw7dFaM0g1idoPkfBooVL5ndhSsbOhHVsFz9DYQ69sumRZp7qHqOGnlZNhDDWmAa18Sb7ZU5ICfi40GQw==","signatures":[{"sig":"MEQCIAxri6Inp3ltjy07AbwPALQQziYodLdGzAX4rglDnJ70AiBL9lQSBRis4B4KgCygFVsaYce3Dh8NQOy80Ee01WhL8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":331672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxHThCRA9TVsSAnZWagAApDoQAKGypGeVpLI9WQLE7XrW\nQXqCzDnZReXzYRRfmKhl3qfHeYYVWAiucqEO8zufjGNTRDtw0zQoNqMMOncb\neH+zn1rf0QdQ8UX/i4aac310H+cZt/myWzIGfy9Yr65ekKVF8qGwiv+QWFj6\n0m5Yf4OBp29Fcz5WOuZctLwG7xLTCqC132OsOzAyEg+tRR0oK/yeP/o2o2Mr\nXZsnZ3TYImP+E0KnauzL/G9n7YUh21ftSScDqiwCx7SGHQ7C5cnirBjl0WAS\nwNvqPmmRiRRpXD/7nZMMuoPd0nkOsiuaSJztgaPeTuiXW3z3ZWO/fp5zCxxG\noxFqJseNHp/MP/Z6/H43d3ee25Y3Aq7QzeTIlG5pgLT7U5lbtYIETcKLiQEW\nSeTKJfO7V7mFbARUN36cGpNpqLUhMFeYOltq62k9Wsyoylm1YRzWbhAFuPo9\nocKR7J1Z5toPU26maA1U4iFhjgKpD0UQS1M8jtEtNX7GR+1Po2GwYrVFEofR\nYa76PoZESjl3pJhWaIS7lNNl75kUzMKPVGGjofDKlZrvEUMya05qZcdSMrWV\nm+q56RaFo6nd2BYR1lsOXqaEvsDgXdV6V6uwxBkgGbhOEQSVpEL4ta9sqYsV\nbHTM4tAtVrSn8u/A1ZEBv7gGO1s1zaFH4cupjBRYhiZF9f5UQVw/grbP+OzH\nlh0J\r\n=bSGO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","gitHead":"7eeb959e64d2f04b78f2061566df59fc47308585","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"mlecoq","email":"mkl.lecoq@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/ArchireportTeam/react-native-static-html-to-pdf.git","type":"git"},"_npmVersion":"8.1.2","description":"Convert static html file to pdf","directories":{},"_nodeVersion":"16.13.1","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^6.0.0","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^14.2.2","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.63.4","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-static-html-to-pdf_0.2.0_1640264929386_0.12771838554736292","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"0.2.1":{"name":"@archireport/react-native-static-html-to-pdf","version":"0.2.1","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/mlecoq","name":"Mickael Lecoq","email":"mickael@lecoq.me"},"license":"MIT","_id":"@archireport/react-native-static-html-to-pdf@0.2.1","maintainers":[{"name":"elnkno","email":"morandi.marc@hotmail.fr"},{"name":"archireportteam","email":"contact@archireport.com"},{"name":"sbos","email":"simon@archireport.com"},{"name":"mlecoq","email":"mkl.lecoq@gmail.com"}],"homepage":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf#readme","bugs":{"url":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf/issues"},"dist":{"shasum":"38f8983925f0c58ecaeb836d7f8c7d4cb8b0947d","tarball":"https://registry.npmjs.org/@archireport/react-native-static-html-to-pdf/-/react-native-static-html-to-pdf-0.2.1.tgz","fileCount":105,"integrity":"sha512-YVZp+QJn3wMKkjzEhVnptjSnKB5cfsS4VVOgtUOap4NzMbp1CkBQUikztOVHLsJaxN2zVPLs6hPuGyGsGX+uOA==","signatures":[{"sig":"MEUCIFfJNIo1SYaO/uVmz8tbJXpWZ0sJeQIciQDjdc3CDGx6AiEAz8ra8lWw5JPh9/5PUj2rV1H6BjjkVxGF/ZTH6OtnqxI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":331652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxI2bCRA9TVsSAnZWagAAvzkP/0LW5y7ouuamn8fwqPRu\nszT7jYVcj+Cx1eYLC84eBh8JSxI2JMFhojVDM7iiE1oJVOikQ+Uuts+vMuiG\nGcAQGEIyY7FxVHZIKuPdvUqrFXJnbBkW1So+DhKPDjKHKQ2oP0Zw0XBZZMTe\nHm6b2h9xqI1WoifHHbz8ZnxqcPAzrfTiijd9iDPXyoQRisYNioFRxVIgA+hI\nCu7EP36muVGFAiXwmIwUeY5tABRBElb6LH40XqQu3NLU2ahU+t+DK7SnjDu4\ntAU1PFPKJSK2mHqMjSgkfUf//NQPazU8jaVTBlgpyf7h5uofM6zIkaEo/Qg5\niFDMhk6vjzQLuJUyzvAlzNsUb900aQ7XZkY/TmL77/asiVYPDIEyh6NHrl0N\n6zD7jiGzXLYx7PkEzuLOkrtj1TMgrvj8Ic839Gb+IQGeWKCbjdaNn35HZoxl\nRb51nABAp2cpwOvJtnx/MAyjVJ6XVMJ9ZfmebUPfvNQ7jaBC/d7h1ebzkozp\n0iicZn4TiaXwIgpWts3LdmBtNQwVK7lKh858jK1BUOq/MvXQYIUUTBTHkkFb\n9rFdiq6qMbrSZiwhEpTBnnGOBQ0BMOQyq7Ai8s/iiKxo+FOxda7nRq1TdGku\nNINYOVC9H0o1/ebjin8K+DJu2bl8DbbEzfnbMcDv+13wrPw4mdEAOemHpIgu\nk6jH\r\n=3WAh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","gitHead":"779e42a29b95d5d959ae4a8c18e31c8ce7b54845","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"mlecoq","email":"mkl.lecoq@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/ArchireportTeam/react-native-static-html-to-pdf.git","type":"git"},"_npmVersion":"8.1.2","description":"Convert static html file to pdf","directories":{},"_nodeVersion":"16.13.1","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^6.0.0","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^14.2.2","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.63.4","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-static-html-to-pdf_0.2.1_1640271259179_0.01867946396925979","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"0.3.0":{"name":"@archireport/react-native-static-html-to-pdf","version":"0.3.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/mlecoq","name":"Mickael Lecoq","email":"mickael@lecoq.me"},"license":"MIT","_id":"@archireport/react-native-static-html-to-pdf@0.3.0","maintainers":[{"name":"elnkno","email":"morandi.marc@hotmail.fr"},{"name":"archireportteam","email":"contact@archireport.com"},{"name":"sbos","email":"simon@archireport.com"},{"name":"mlecoq","email":"mkl.lecoq@gmail.com"}],"homepage":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf#readme","bugs":{"url":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf/issues"},"dist":{"shasum":"b196930e6edb5de0335bbe9cdcbbff691f26b615","tarball":"https://registry.npmjs.org/@archireport/react-native-static-html-to-pdf/-/react-native-static-html-to-pdf-0.3.0.tgz","fileCount":105,"integrity":"sha512-GaBbwSZDWL3xztn5rT/QALUBX6Em+WOejAgdd2HCMPcxx27T4SrpoOMkb4QRyHo7OZOasv44QpIHXXDqr++2Zw==","signatures":[{"sig":"MEUCIGqV+6n72nNxu2SLNzov44y8TqVEeFFvbauugtOrnLQsAiEA+ulBkystYxbRYjcTamZdFYDX4LDHRy3GuR6YjuVMHCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":341459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijimAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTCA/+I/f9UgquhScLBVdgY6BE5pL299BH93ZoxBDwlXcQV8TX86ge\r\nHINrse+65RlUpvBQ5WAl5GofkzUYKa/6T//bEV/G485HeK0QgCKTjv9QSDia\r\ndAKCgnhsDpvHwH5Vfur1ROYWkCdFmr00UMiFZviJWx/xThC5/7ftIzP/gkl3\r\nBYRD+tK6kkPwmbbTypxwEObKsyCLViJ6T5oj/qx2mZW12oGzT9QdF4Kl38CD\r\n1kQ4tkBmcsWucY10yGohnLXiytFugz3+V/arrEE0uqqYYoB604CNiG2d/tVE\r\nUvpuEDGsnsmOvTSeGkajZxjBT3RtTJLhoYkdZ4GMOYLqE7ZAvz1cFGmKlWtu\r\nS7OXFj07UYl+hGN0OTxaQE5QEyn+oLbbiNROYhZNqlYdKAWU5Xyms268r2Bz\r\na0Z2u+mCHeLRI0YE3agVouxiXtIFACIJOH52SqYV5z6wOojPL2EvJIsegGcQ\r\nef7IoXYA98vK+KMriusux0T+CdSCTMfWVPFaxhNowF0Rab/92mS/lQuKTakA\r\nGoL1B1ZsDzE/i5DZqOCdWGhPlXsxaGiXecu02n2+pBb35mjq+g/rYOR8NO9u\r\nypCFygM1xxeZjk5ifPad3AYXoE/W5kUnUzRW0OwA/jC1nwnsb3E/1styeUhT\r\nlpynpNzCH+v8o3+PP++MRpVB4/PBBfJclt8=\r\n=2Xys\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","gitHead":"7c5a52657603fe9d5a02e462e72fd3c97120c15e","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"mlecoq","email":"mkl.lecoq@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/ArchireportTeam/react-native-static-html-to-pdf.git","type":"git"},"_npmVersion":"8.1.2","description":"Convert static html file to pdf","directories":{},"_nodeVersion":"16.13.1","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^6.0.0","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^14.2.2","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.63.4","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-static-html-to-pdf_0.3.0_1653483904495_0.033289435650130095","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}}},"time":{"created":"2021-12-23T13:08:49.385Z","modified":"2026-05-18T11:22:23.955Z","0.2.0":"2021-12-23T13:08:49.528Z","0.2.1":"2021-12-23T14:54:19.347Z","0.3.0":"2022-05-25T13:05:04.627Z"},"bugs":{"url":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf/issues"},"author":{"url":"https://github.com/mlecoq","name":"Mickael Lecoq","email":"mickael@lecoq.me"},"license":"MIT","homepage":"https://github.com/ArchireportTeam/react-native-static-html-to-pdf#readme","keywords":["react-native","ios","android"],"repository":{"url":"git+https://github.com/ArchireportTeam/react-native-static-html-to-pdf.git","type":"git"},"description":"Convert static html file to pdf","maintainers":[{"email":"geoffrey@archireport.com","name":"geoff-desj"},{"email":"contact@archireport.com","name":"archireportteam"},{"email":"simon@archireport.com","name":"sbos"},{"email":"arnaud@archireport.com","name":"zarn0"},{"email":"jean-mary@archireport.com","name":"jmraffegeau"},{"email":"yoann@archireport.com","name":"yoanndelion"},{"email":"elie@archireport.com","name":"elie_archireport"},{"email":"julien@archireport.com","name":"juliencotteaux"},{"email":"leo@archireport.com","name":"lthierry"},{"email":"vincent@archireport.com","name":"vincentarchi"}],"readme":"# react-native-static-html-to-pdf\n\nConvert static html file to pdf\n\nThis library is inspired by [react-native-html-to-pdf](https://github.com/christopherdro/react-native-html-to-pdf). It takes a static html file as parameter (whereas react-native-html-to-pdf takes a string as argument).\n\nIt takes a screenshot of the page before redirection to `target`. So you need to add in your html file the following script at the end of the execution of your js\n\n```js\nwindow.location.href = 'http://finishload.com';\n```\n\nThe returned value is the path of the generated pdf file\n\n## Installation\n\n```sh\nnpm install @archireport/react-native-static-html-to-pdf\n```\n\n## Usage\n\n```js\nimport { generatePdf } from '@archireport/react-native-static-html-to-pdf';\n\n// ...\n\nconst pathOfGeneratedPdf = await generatePdf({\n  path: `${DocumentDirectoryPath}/public/index.html`,\n  target: 'http://finishload.com',\n  documentName: 'file.pdf',\n  width: 612,\n  height: 792,\n});\n```\n\nwhere\n\n| param        | description                                         | example                                                                                          |\n| ------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------ |\n| path         | path to your html file (it must be under documents) | `${DocumentDirectoryPath}/index.html` (_DocumentDirectoryPath_ is provided by `react-native-fs`) |\n| target       | url used to indicate that js execution is finished  | `http://finishload.com`                                                                          |\n| documentName | name of the generated pdf (in cache directory)      | `file.pdf`                                                                                       |\n| width        | width of the generated pdf                          | 612                                                                                              |\n| height       | height of the generated pdf                         | 792                                                                                              |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}