Convert HTML to PDF ignores table borders

Hi,

I’m currently evaluating Aspose for our product.
We need to convert generated Html-Reports to Pdf/Xps…

My problem is that when I insert Html to a document the table borders are ignored.

Code:

var builder = new DocumentBuilder();

using(var file = File.OpenText(@"c:\temp\test.html"))
{
    builder.InsertHtml(file.ReadToEnd());
}

using(var destination = File.Create(@"c:\temp\test.docx"))
{
    builder.Document.Save(destination, SaveFormat.Docx);
}

I’ve attached the input/output files I get. Is there a way to get the borders?

Thanks,
Wolfgang

Hi Wolfgang,
Thanks for your request. The problem occurs because Aspose.Words does not support CSS styles on table, tr, td and th nodes on HTML import. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
As a temporary workaround, you can try using inline styles, but this way is suitable only if you have a control over HTML generation process.
Best regards,

What is the status of implementing CSS support on table, tr, td, and th nodes on HTML import? This is very critical to our use of Aspose.Words. In particular, I need for CSS class names to be available on imported tables as style names. Thanks.

Hi Jeff,

Thanks for your inquiry. Unfortunately, WORDSNET-3163 is not resolved yet. I have verified the status of this issue from our issue tracking system and regret to share with you that this issue has been postponed till a later date. We will be sure to inform you of any developments and let you know once it is resolved. We apologize for your inconvenience.

Secondly, please note that there are plans to import CSS style on table as a Table Style in future:
https://docs.aspose.com/words/net/table-features-supported-on-html-import/

Best regards,

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

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