Aspose Words 22.214.171.124
Aspose PDF 126.96.36.199
Aspose Pdf.Kit 188.8.131.52
Whenever I try converting the attached word document to pdf using the following method:
pdf = new Aspose.Pdf.Pdf();
pdf.IsImagesInXmlDeleteNeeded = true;
It throws a stackoverflow exception. I have attached the Word file along with the intermediary .xml file that gets generated during PDF conversion.
I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-11411 . We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />As a workaround, I would suggest you to use the Direct-to-PDF save method of Aspose.Words, as during my test, I've successfully been able to generate the PDF document. For your reference, I've attached the resultant document.
We cannot use the DirectToPdf method as it does not have full support for Asian fonts and causes numerous rendering issues with our outputs. Please let us know any information about this issue that you can. We have a release coming up in a couple of weeks and need to identify what is causing this to happen. Is there something wrnog with the document we sent in? or some sort of work-around?
The issue is occurring over Aspose.Pdf end and as soon as we've made some progress regarding the resolution of this problem, we would be pleased to update you with the status of resolution.
Your comprehension is greatly appreciated in this regard.
After some further investigation we found that the client document has some malformed Html in it:
1. The valign attribute on the Field/Value table is malformed and split into two attribute ‘va’ and ‘lign’, however, Aspose probably just ignores this as they do any other unrecognized attribute.
2. There is the text ‘xxxx’ before the table tag just after the
malformed valign attributes and it is this text that seems to cause the
problem because once this text is removed the document publishes
successfully. Browsers generally add an implicit
Once the html is fixed to either remove the ‘xxxx’ or surround it in a
We no longer require assistance for this issue, thanks for all your help!
We would like to reopen this issue because, after further investigation, we have identified what is causing the issue. Aspose.Pdf is throwing the StackOverflowException because of nested tables in the Html. Please see the attached html file. When this is injected into a one-cell Word table via InsertHtml we are seeing the problem.
The problem starts on line 47 with the table definition. When the table/tbody/tr/td tags are all removed, and their corresponding close tags as well, converting to Pdf works. With those tags in there it does not work. I’ve attached the html that is injected into the Word document, the resulting Word document that was built, as well as the Aspose.Pdf.xml file that is generated when we’re trying to convert the Word document to Pdf.
The issue seems to be resolved in the hotfix shared over this link. I've tested the scenario using this hotfix and I'm unable to notice the problem. Please try using it and in case you still face any problem, feel free to contact.
I've also attached the resultant PDF document that I've generated.
The hotfix dll you attached works! Thanks so much for your help with this!