Hi Chris,
We are sorry for the inconvenience.
Best Regards,
Document document = new Document(in);
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
saveOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
saveOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
File file = tempFiles.newTempFile();
document.save(file.getAbsolutePath(), saveOptions);
Hi Chris,
I have tested the scenario and have managed to reproduce the problem that conversion from PDF to HTML having watermark hides content. For the sake of correction, I have logged it as PDFJAVA-36626 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time.
As a workaround you can use following simple code snippet
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
document.save(dataDir + "output_f.html", saveOptions);
We are sorry for this inconvenience.
We actually cannot workaround it because we need to produce HTML in single file.
Hi Chris,
Document document = new Document(dataDir + “in.pdf”);
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
saveOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
saveOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
saveOptions.setUseZOrder(true);
document.save(dataDir + “output_fahad.html”, saveOptions);