Free Support Forum - aspose.com

Word to PDF - Table issue

Hello,

We are having problems converting the attached Word document (‘Doc.doc’) to PDF; please see attached ‘TEST - Aspose.Pdf 3.4.0.0 - Aspose.Words 4.0.0.3 (net 1.1).pdf’. We are using Aspose.Pdf 3.4.0.0 and Aspose.Words 4.0.0.3 for net 1.1. We downloaded the latest versions of the components (Aspose.Pdf 3.4.5.0 and Aspose.Words 4.2.5.0 for net 2.0) and still have problems; please see ‘TEST - Aspose.Pdf 3.4.5.0 - Aspose.Words 4.2.5.0 (net 2.0).pdf’. Following our code snippet,

...

new Aspose.Words.License().SetLicense(Util.AsposeLicense);

document = new Document(path);

...

new Aspose.Pdf.License().SetLicense(Util.AsposeLicense2);

MemoryStream xmlStream = new MemoryStream();

document.Save(xmlStream, SaveFormat.AsposePdf);

Pdf pdf = new Pdf();

pdf.BindXML(xmlStream, null);

xmlStream.Close();

string file = System.IO.Path.Combine(path, Util.ValidateFileName(path, System.IO.Path.ChangeExtension(System.IO.Path.GetFileName(document.OriginalFileName), PDF.Extension)));

pdf.Save(file);

Why the text before the table from the Word document is moved to right after the table in the PDF file?

Thanks,

Juno

I tested this document and found the “Text before the table” is after the table in the xml generated by Aspose.Words. So I am moving this thread to the Aspose.Words forum.

Hello,

Do you have any news on this?

Thanks,

Juno

Dear Juno,

Terriblely sorry for my mistake. I forgot to move this post. Now I have moved it. I hope Aspose.Words team will check this issue and reply to you soon.

Hi Juno,

Thank you for reporting the issue. This happens because the table is absolutely positioned and physically (by the order of nodes) it is indeed located before the "Text before the table". Absolutely positioned tables are not yet supported when exporting to PDF. To make the table inline, go to Table Properties and change Text Wrapping from Around to None. By the way, you will notice the table will get positioned accordingly to the order of the nodes within the section's body. Now move "Text before the table" so that it would really be located before the table, and the export will work as expected.

Hello,

I have tried the latest version of Aspose.Words (6.3.0.0) to save a document to Pdf (document.Save(fileName, SaveFormat.Pdf)) and the problem is still happening. Do you have any plans to support absolutely positioned tables when exporting to Pdf?

Thanks,
Juno

Hi Juno,

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

Thanks for your inquiry. Yes of course we plan to support absolutely positioned tables during converting to PDF. This is the issue #6898 in our defect database. I will notify you as soon as this feature is supported.

Best regards.

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


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