I have snippets of HTML that I want to add to my pdf. The html Snippets have images embeded as base64 string in the html itself.
When I add the html snippet as HTMLfragement to page it works fine, but when the images are big it cuts of the image.. Following is the code I am doing
row = table.getRows().add();HtmlFragment html = new HtmlFragment(i.getComments());
c = row.getCells().add();
c.getParagraphs().add(html);But when I do the same html snippet with loadoptions and save as pdf it looks fine.Document htmlDoc = new Document(new ByteArrayInputStream(i.getComments().getBytes(StandardCharsets.UTF_8)),
htmlLoadOptions);
htmlDoc.save("D:/work/temp_xxx.pdf");Is there a way for me when creating a HTMLFragment, to set the size like loadOptions ? If not is their a workaround ?