We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HTML export: incorrect alignment of table header

Hi, when saving the attached Word document (test.doc) containing a tabel with Aspose.Words 9.0.0.0 as HTML the alignment of the table header is not as aspected. The header of the second column is left aligned, but in the HTML it's centered.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Hi, when will a fix for this problem be available? Thanks and regards.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Unfortunately, I cannot provide you more solid estimate regarding this issue at the moment. We will keep you informed on any developments regarding this issue.

Best regards,

Hi, are there any news about this issue? Thanks and regards.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, the issue is still unresolved. We will let you know once it is fixed. My apologizes for inconvenience.

Best regards,

Hi, are there any news about this issue? Thanks and regards.

Hi

Thanks for your request. Unfortunately, the issue is still unresolved. We will let you know once it is resolved.

Best regards,

Hi, is there an issue ID for this problem? Thanks and regards.

Hi

Thanks for your request. The issue id is 17391.

Best regards,

Hi There.


We are also experiencing this issue. Basically the problem is that the outputted html treats the default text alignment as left: which it is for the most part, except for in table headers.

In our testing, we have seen that the following code fixes the errors with table heading alignment in the generated html:

loWordsDoc.Save(lsOutputFileName, SaveFormat.Html)

'//fix table headings
Dim loXmlDoc As New Xml.XmlDocument()
loXmlDoc.Load(lsOutputFileName)
For Each loNode As Xml.XmlNode In loXmlDoc.SelectNodes("//th/p")
Dim loStyleAtt = loNode.Attributes(“style”)
If loStyleAtt Is Nothing Then
loStyleAtt = loXmlDoc.CreateAttribute(“style”)
loStyleAtt.Value = “text-align: left”
loNode.Attributes.Append(loStyleAtt)
Else
Dim lsStyle As String = loStyleAtt.Value
If Not lsStyle.Contains(“text-align:”) Then
lsStyle &= “; text-align: left”
End If
loStyleAtt.Value = lsStyle
End If
Next
loXmlDoc.Save(lsOutputFileName)

Hope this is helpful. :slight_smile:

Regards,
Simon.

Hi Simon,

Thanks for posting your code here. I'm sure this will come in very helpful for those who are having the same issue. We will inform you as soon as this issue is resolved fully in Aspose.Words.

Thanks,

The issues you have found earlier (filed as WORDSNET-3550) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan