java - Convert HTML2PDF and base64 images -
my html content below:
<html> <body> <b>this bold text</b><br/> <img style="width:91px;" align="middle" alt="mylogo" src="data:image/jpeg;base64, {base_64_data}"/> </body> </html> and have simple conversion code:
outputstream file = new fileoutputstream(new file("dest.pdf")); document document = new document(); pdfwriter writer = pdfwriter.getinstance(document, file); document.open(); inputstream = new bytearrayinputstream(content.getbytes()); xmlworkerhelper.getinstance().parsexhtml(writer, document, is); ... when run it, generates dest.pdf file contains bold text. there not image in pdf file.
how can solve problem?
Comments
Post a Comment