Hi
Hello Cheng,
Thanks for contacting support.
I have tried to run your code with Aspose.Pdf for .NET 17.6, as it is recommended to use latest version, and I was unable to execute it. It seemed that there was some JAVA code mixed in the code snippet. However, I have converted your PDF file into HTML with same HtmlSaveOptions settings and was unable to notice the issue which you have mentioned.
Please check the following code snippet which I have used to convert PDF into HTML. For your reference, I have also attached an output file, generated by below code snippet.
Document pdfDocument = new Document(dataDir + @“testPDF2.pdf”);
string outHtmlFile = dataDir + @"testPDF2.html";
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
saveOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.AlwaysSaveAsWOFF;
saveOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
saveOptions.LettersPositioningMethod = HtmlSaveOptions.LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
saveOptions.SplitIntoPages = (false);
pdfDocument.Save(outHtmlFile, saveOptions);
Please try using above approach for conversion process, and in case if you still face any issue, please feel free to let us know.
Best Regards,
Hi Asad.Ali
Hello Cheng,
Thanks for your patience.
We are pleased to share that the issue reported earlier as PDFJAVA-36826, is resolved in latest release of Aspose.Pdf for Java 17.7. Please try using the latest release version and in case you encounter any issue or you have any further query, please feel free to contact.