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.
<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: 9pt;”><pre style=“font-family: “Courier New”; font-size: 9pt;”>row = table.getRows().add();
c = row.getCells().add();
HtmlFragment html = new HtmlFragment(i.getComments());<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”;”><pre style=“font-family: “Courier New”;”>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 ?