HTML to Word HTML Table row borders

Hi,

We are trying to convert a very simple html doc containing a table with a border on the bottom of each row into a doc\docx.
Is there something we need to do to get the borders to appear in the resulting word doc?

Thanks.
Hi,

Thanks for your inquiry. Could you please attach your input HTML file and output Word document (DOCX file) showing the undesired behavior here for testing? We will investigate the issue on our end and provide you more information.

Best regards,

I wasn’t able to upload the file with an .html extension so please remove the .doc from the index.html.doc file to get to the raw HTML.

The Index.doc is the output file.

Cheers

Hi,


Thanks for your inquiry. After an initial test with Aspose.Words for .NET 15.7.0, I was unable to reproduce this issue on my side (please see attached 15.7.0.doc). I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Best regards,

Ok. Would you please provide me with the steps you went through to produce the doc?

I must be doing something wrong as I have been using the 15.7 version of the aspose.words.dll.

Regards.

Hi,


Thanks for your inquiry. Please see attached simple console application.

Best regards,

Thanks very much for the example code however, it doesn’t work for us we get the same formatted doc file. we are using Nuget to get Aspose.words.dll and that gives us version 15.8.1.

Totally lost any help would be great.

Cheers

Hi,


Thanks for your inquiry. Regarding the usage of the ‘interim build’ of Aspose.Words i.e. 15.8.1, it was only meant for a particular few customers who required it. We strongly recommend you please use the latest official release of Aspose.Words that is 15.8.0. For now you can manually download it from following link. It worked fine on my end (see attached 15.8.0.doc).
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

We will also upload correct release package to NuGet shortly. We apologize for any inconvenience.

Best regards,

Well we also tried the 15.7.0 version with the same out come.

I’ve tried your code and it works the same as ours!
I can’t seem to get Aspose.Words to create a word doc HTML file which inherits the styles defined in the HTML file.

I don’t think that this is a dll version issue.

Cheers,
Hi,

Thanks for your inquiry. To ensure a timely and accurate response, it would be great if you please create a standalone simple console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we'll start further investigation into your issue and provide you more information.

Best regards,

Here you go!

Before you run the app can you copy the output (15.7.0.0.doc) so you can see the difference between what we produce and you produce.

The purpose of this experiment is to see if you can reproduce our output so you can tell us what we need to change to get the correct output.

Please don’t just confirm that it works for you, tells us why it does not work for us.

Good luck.

Best Regards,

Hi,


Thanks for the details. I could still generate correct .doc file on my end even when using your project. I have also attached another project which generates following warnings on my end. Please run this application on your end and share what warnings it produces on your end?

MinorFormattingLossCategory: DrawingML is not supported in Doc format and will be converted to shape.
MinorFormattingLoss: Table style 0x11 can not be preserved and will be converted to direct formatting.

What version of MS Word are you using and on what OS? I tested your scenario over ‘64-bit Windows 10 Pro’ having MS Word 2013 installed on my side.

Best regards,

Hi,

Word 2010 and 64-bit Windows 7 sp1.

Warnings :
MinorFormattingLossCategory: DrawingML is not supported in Doc format and will be converted to shape.
MinorFormattingLoss: Table style 0x10 can not be preserved and will be converted to direct formatting.

Is it a license issue or a MS Word version issue?

Thanks

Hi,


Thanks for your inquiry. Your HTML fetches CSS and JS information from following links:

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.js

If you’re connected to internet, Aspose.Words automatically fetches these resources and applies correct formatting to Table. Else if your machine is not connected to internet, then only you’ll observe that row borders are not preserved in Aspose.Words generated DOC.

Best regards,

Hi,

I think you might be on the wrong line of investigation!
The HTML page renders without error on the machine which runs the Aspose.Words application. So the links are definitely resolved and there is no issue with the HTML.

Are there any special permissions an application using Aspose.Words requires in order to allow the application to resolve http requests?
Are you sure its not a licence or MS word issue?

Cheers


Hi,


Thanks for your inquiry. I believe, this is not a licence or MS word issue.

Are you able to open this HTML with MS Word and then Save As DOC Does the MS Word generated DOC file show correct output? Are you sitting behind a proxy which requires credentials for authentication? If yes, the LoadOptions.ResourceLoadingCallback property can be used to pass the needed credentials. A class implementing IResourceLoadingCallback is used to control how resources such as images or CSS are handled when they need to be downloaded from an external source i.e a network or internet. Inside IResourceLoadingCallback.ResourceLoading method, you first need to connect through proxy to fetch data and then pass data to the ResourceLoadingArgs.SetData method. I hope, this helps.

Best regards,

Ok, that was the issue. The Proxy!!


adding:
<system.net>
<defaultProxy enabled=“true” useDefaultCredentials=“true”>
<proxy usesystemdefault=“true” bypassonlocal=“true” />
</defaultProxy>
</system.net>
to the web config as described in this article on SO allowed the app to resolve the URI in the HTML document.

I didn’t need to use the LoadOptions.ResourceLoadingCallback after all.

Thanks for your assistance.


Hi,


It is great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,