Free Support Forum - aspose.com

SaveToPdf function will converts some images and grids to PDF incorrectly

I’ve tried the latest Aspose.Word.dll version 8. There are improvements with this function SaveToPdf compared with v6.4, but it’s still incorrect.

I’ve attached a template which I used and the saved PDF file. As you can see the signature has been cut off and the tables were rearranged with unnecessary spaces and was cut short as well. But in the printed xps file, it’s just fine.

The code we use are as follows:

Document doc = new Document(documentpath);
doc.SaveToPdf(outputPath);

Also it looks this function will only work with some,but not all the Word arts in MS Word 2007.

Is this a know issue and when can we expect a fix?

Hi

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

Thanks for your request.

1. I managed to reproduce the problem with image on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

2. I also reproduced the problem with tables on my side. The problem occurs because your tables are floating. At the moment, Aspose.Words does not support positioning of floating tables.

Another reason of the problem is that there are no paragraphs between tables. You can partially work the problem around by adding an empty paragraph between tables. Please see the following code:

// Open document.

Document doc = new Document(@"Test001\in.doc");

// Get collection of tables

NodeCollection tables = doc.GetChildNodes(NodeType.Table, true);

Paragraph spliter = new Paragraph(doc);

spliter.ParagraphBreakFont.Size = 1;

// loop through all tables

foreach (Table table in tables)

{

// Check if the next node after the tabel is another table.

// If so, insert an empty paragraph between tables.

if (table.NextSibling != null && table.NextSibling.NodeType == NodeType.Table)

table.ParentNode.InsertAfter(spliter.Clone(true), table);

}

// Save output document

doc.SaveToPdf(@"Test001\out.pdf");

Also, you can try refactoring your document in MS Word.

Best regards.

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


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

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


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

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.
(50)