Different output of same file in docx and pdf

Hello,

We are developing a .NET application that generates reports of our products. We allow our users to save it both in .pdf and .docx format, but the output differs in some points, specially in table width, and its columns.

Note that the code is exactly the same in creating both documents, can you help us?

Regards

Hi there,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Hello Tahir,

I send you a sample console application that loads a serialized Aspose document, “report.bin”, and store it in a Aspose.Words.Document object. Then loads it and save in .pdf and .docx format.

Our report is generated from various templates, not only one, and then I cannot send you the “solo” template.

You will notice that the output is different in the points I noticed in my last post, although the source object is the same.

Regards,

Xavier

Hi Xavier,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15451. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello,

I noticed that there also some problems in generating the document as ‘.odt’. Perhaps is the same problem, or not. You can check it in the sample app that I sent.

Regards

Hi Xavier,

Thanks for your inquiry. We have converted the shared document to ODT and have noticed that it is not opened in MS Word 2016. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15474. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Could you please share if you are using different code example from AsposeTableFormat application? Please also share the Aspose.Words’ version that you are using.

Hello Tahir,

I made some tests here, and seems that is not possible to save properly to odt from a byte array, I don’t know why. Unfortunately, I cannot send you the entire generating code for the document, due it’s divided in many files, and uses database data.

I attach you the output odt file, hope it helps.

Regards

Hi Xavier,

Thanks for sharing the detail.

Unfortunately, it is difficult to say what the problem is without documents and simplified application. We need your documents and simple project to reproduce the problem. As soon as you get these pieces of information to us we’ll start our investigation into your issue.

Hello Tahir,

You can reproduce the problem in .docx with the application I sent two weeks ago. There are any progress on that? Perhaps is better to solve this problem first.

Regards

Hi Xavier,

Thanks for your inquiry. We regret to share with you that the issue (WORDSNET-15451) has been postponed due to missing feature WORDSNET-832 (Make table layout as close to Word as possible) which is related to it.

After the fix of WORDSNET-832, our product team will look into this issue. We will be sure to inform you via this forum thread as soon as this feature is available. We apologize for your inconvenience.

@xsfermator,
The issues you have found earlier (filed as WORDSNET-15474) have been fixed in this Aspose.Words for .NET 18.2 update and this Aspose.Words for Java 18.2 update.
Please also check the following articles:

A post was split to a new topic: The exporting in pdf generates a different table than the one in word