
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@archireport/react-native-static-html-to-pdf
Advanced tools
Convert static html file to pdf
This library is inspired by react-native-html-to-pdf. It takes a static html file as parameter (whereas react-native-html-to-pdf takes a string as argument).
It 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
window.location.href = 'http://finishload.com';
The returned value is the path of the generated pdf file
npm install @archireport/react-native-static-html-to-pdf
import { generatePdf } from '@archireport/react-native-static-html-to-pdf';
// ...
const pathOfGeneratedPdf = await generatePdf({
path: `${DocumentDirectoryPath}/public/index.html`,
target: 'http://finishload.com',
documentName: 'file.pdf',
width: 612,
height: 792,
});
where
param | description | example |
---|---|---|
path | path to your html file (it must be under documents) | ${DocumentDirectoryPath}/index.html (DocumentDirectoryPath is provided by react-native-fs ) |
target | url used to indicate that js execution is finished | http://finishload.com |
documentName | name of the generated pdf (in cache directory) | file.pdf |
width | width of the generated pdf | 612 |
height | height of the generated pdf | 792 |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
Convert static html file to pdf
The npm package @archireport/react-native-static-html-to-pdf receives a total of 0 weekly downloads. As such, @archireport/react-native-static-html-to-pdf popularity was classified as not popular.
We found that @archireport/react-native-static-html-to-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.