I want to print a pdf file with an html image embedded on it in react native expo mobile application. And when I tried generating the pdf file, image is not included on the generated pdf file. Any help on how to include image in my pdf file.
createPDF = async (html) => {
try {
const {uri} = await Print.printToFileAsync(html);
Print.printAsync({ uri });
this.setState({callPrint: false});
} catch(err) {
console.error(err);
this.setState({callPrint: false});
}
};
const html = "
<html>
<body>
<div class='title-container'>
<img source="asset/omnix.png" />
</div>
</body>
</html>
";