Free Support Forum - aspose.com

Problems in Word to PDF conversion

Hi,

I am using Aspose.Words (v5.1.0.0) and Aspose.PDF (v3.6.2.3) to convert a Word document to PDF. The code used to achieve this is:

string docFile = @“C:\Source.doc”;
Document doc = new Document(docFile);
MemoryStream tempMemoryStream = new MemoryStream();
doc.Save(tempMemoryStream, SaveFormat.AsposePdf);
Pdf pdf = new Pdf();
pdf.BindXML(tempMemoryStream, null);
string pdfFileName = @“C:\Destination.pdf”;
pdf.Save(pdfFileName);

I have attached a Word document, Source.doc and the corresponding PDF, Destination.pdf. I have observed the following issues:
1. The text gets superimposed on the image on page 1.
2. There is no border for the table on page 2.
3. All content in the word document is enclosed in a 1x1 table. This margins for the table are not maintained in the pdf file, the left margin is much greater than the right margin.

Could you please look into these issues?

Regards,

Manish Bhardwaj
Prudential

Hello Manish,

I have tested the scenario using Aspose.Pdf 3.9.0.0 and Aspose.Words 6.0.0 and in my case I am unable to notice the problem 1 and 3 that you have specified. Where as the second problem concerning, table border on page 2, the issue seems to be over Aspose.Words end as, table border information is not exported in the intermediate XML which is ultimately used by Aspose.Pdf to generate the Pdf file.

Beside this, there is little formatting issue regarding the graph being displayed over second page. Its also an issue over Aspose.Words end, as the left margin information is not being properly exported.

We are working in coordination with Aspose.Words team, in order to get these issues resolved, and will keep you updated with the status of correction. We apologize for your inconvenience.

For the reference purpose, I’ve attached the resultant file that I’ve generated, please take a look.

Dear Manish,

I am a developer of aspose pdf team. Our customer supporter asked me to check this issue. I have tested it with latest versions of both Aspose.Pdf and Aspose.Words. Here is my investigation on those format problems:
1. The text gets superimposed on the image on page 1.
I can’t reproduce it with latest releases. Just as Nayyer stated, the image is not center aligned as it is in MS Word. I have confirmed that it is an issue in Aspose.Words side. I have reported it to aspose words team. They will reply to you soon.
2. There is no border for the table on page 2.
It should be not a bug. Please open the doc with MS Word and see print preview. The table has no border indeed.
3.
All content in the word document is enclosed in a 1x1 table. This
margins for the table are not maintained in the pdf file, the left
margin is much greater than the right margin.
I can’t reproduce it with latest releases.

Best regards.


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

I’m Viktor, the developer on Aspose.Words Team responsible for integration with Aspose.Pdf. My colleagues asked me to take a look on your case with improper positioning of the flowchart.

This diagram belongs to an inline canvas. Aspose.Pdf currently doesn’t provide means to control alignment or left indent of inline canvas. We’ll consult with Aspose.Pdf developers regarding this improvement.

Regards,

Hi,

Thanks a lot for your prompt reply. Using the latest version of Aspose.Word (6.0.0.0) and Aspose.Pdf (3.9.0.0) did solve a few of my problems. However I’ve done some more testing and found the following:

There are 2 foot notes in my source word document, Source-2.doc, one on page 1 and the other on page 2. In the converted document, destination-2.pdf, both footnotes appear on page 2 and overlap with the body text.

Could you please have a look.

Regards,

Manish



Hello Manish,

I have tested the scenario and I am able to notice the problem. We are looking into the details of this matter and will keep you updated with the status of correction. We apologize for your inconvenience.

Dear Manish,

I am able to reproduce the error and have logged it as PDFNET-6920 in our defect tracking system. We will try our best to fix it ASAP.

Best regards.

The issues you have found earlier (filed as 6920) have been fixed in this update.


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