Invalid characters in HTML while converting PDF to HTML

Hello,


We have used Aspose.pdf for convert while display content of file in HTML. I have selected one PDF file and got an issue while converting content into HTML and it displayed some invalid characters.I have tried with newest version 11.4.0 but not worked.I have attached here original sample pdf file which gives an issue so this will help you to identify cause of this issue.

Below is code that we have used in our asp.net application,

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(sourcePath);
HtmlSaveOptions htmlOptions = new HtmlSaveOptions();
htmlOptions.FixedLayout = true;
htmlOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.AlwaysSaveAsTTF;
htmlOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
pdfDocument.Save(htmlFileName, htmlOptions);

Please reply as soon as possible as we got this issue on our live environment so need to solve in urgent basis.Feel free to ask me more details if you want.

Thanks

Hi there,

Thanks for your inquriy. I have tested the scenario using following code snippet with Aspose.Pdf for .NET 11.4.0 and unable to notice the issue. Please share your sample code and resultant HTML here, so we will look into it and will guide you accordingly.

Best Regards,

Hello,


Thanks for the information.

please find output.png file for sample output which we got after saving pdf to html.

Also we have license for ASPOSE.PDF 9.2 so can you please check with the same version if possible.

Code which we are use to generate html is as below.

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(sourcePath);
HtmlSaveOptions htmlOptions = new HtmlSaveOptions();
htmlOptions.FixedLayout = true;
htmlOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.AlwaysSaveAsTTF;
htmlOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
pdfDocument.Save(htmlFileName, htmlOptions);


Thanks,

Jignesh Chauhan

Hi Jignesh,


Thanks for sharing your sample code. Even I have tried with Aspose.Pdf for .NET 9.2.0 and unable to replicate the issue. We will appreciate it if you please share some console application to replicate the issue.

Furthermore, please note we maintain a single code base of our APIs. So all issues fixes and improvement are made in latest release and we do not provide hot fix for old version. It is always recommended to use latest release.

We are sorry for the inconvenience caused.

Best Regards,