Opening Html file to export it as a pdf


#1

Hi,

I would like to open the attached html file in Aspose.Words to export it as an xml openable by Aspose.Pdf :

Document doc = new Document(@"C:\\report.htm");

doc.Save(@"C:\\report.xml", SaveFormat.FormatAsposePdf);

However the Save method crashes

Index was outside the bounds of the array.

Thanks for you help with this

Emmanuel


#2

Thank you for reporting this problem to us. HTML fails to be imported properly due to limitaions of our HTML engine. I have logged this to our defect base as issue #1149. We will try to fix it in our next release which will be in the end of August.

Best regards,


#3

end of August is ok to have me meet the deadline of the related project I work on.

Please let me know as soon as possible if you won't be able to deliver a fix, since I'll need to set up a backup plan.

Thanks
Emmanuel


#4

Hi,

Do you have an update on this?

Thanks
Emmanuel


#5

The issue is fixed. The version with the fix will be published on the next week.

Best regards,


#6

I also had a look at this html file. It is now imported to Aspose.Words without throwing errors. It is also exported to PDF okay. However, there is a lot of CSS formatting using styles that Aspose.Words does not yet understand. Only inline CSS styles are supported. The new version of Aspose.Words that will come out soon certainly imports this HTML better (tables etc) but support for CSS styles is still not that rich to import this document well. It will remain on our task list.