Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_printHTMLToPDF = async () => {
try {
const pdf = await Print.printToFileAsync({
html: `
<h1 style="font-size: 50px; font-family: Helvetica Neue; font-weight: normal;">
Hello Expo!
</h1>
<img style="width: 90vw;" src="https://d30j33t1r58ioz.cloudfront.net/static/guides/sdk.png">
`,
});
_printHTMLToPDF = async () => {
try {
const pdf = await Print.printToFileAsync({
html: `
<style>
@page {
margin: 20px;
}
</style>
<h1 style="font-size: 50px; font-family: Helvetica Neue; font-weight: normal;">
Hello Expo!
</h1>
<img style="margin: 20px;" src="https://snack.expo.io/static/expo-logo.png">