Pdf with images to html PartsEmbeddingModes.NoEmbedding causes broken document

I’m converting pdf to html as follows and in result I have empty html page with broken bmp image.

I’m adding example pdf as attachment. Do you know any workaround?
testImage.tif.pdf (669.5 KB)

Document copyDocument = new Document(in);
            document = copyDocument;
            File file = tempDirectories.newTempDir();
            HtmlSaveOptions saveOptions = new HtmlSaveOptions();
            saveOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.NoEmbedding;
            saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
            saveOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
            saveOptions.setUseZOrder(true);
            document.optimize();
            document.save(file.getAbsolutePath(), saveOptions);

@pdu-avaleo

Thanks for contacting support.

We have tested the scenario with Aspose.Pdf for Java 17.8 by using shared code snippet and were unable to notice the issue, which you have mentioned. Please check following code snippet which we have modified (as there was an undefined object i.e document) to test the scenario and for your reference, we have also attached an output, generated by it.

Document document = new Document(dataDir + "testImage.tif.pdf");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.NoEmbedding;
saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
saveOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
saveOptions.setUseZOrder(true);
document.optimize();
document.save(dataDir + "testImage.tif.html", saveOptions);

output.zip (719.6 KB)

Please use latest version of the API and in case you still face any issue, please share a sample application and generated output at your end, along with the environment details i.e OS Version, JDK Version etc. We will test the scenario in our environment and address it accordingly.