Printing word document with rigth aligned tables

Hello,
I have a word document with some right aligned tables. (See attached docx).
When i print this docoument with Aspose.Words.Document.Print() or export it to PDF via Aspose.Words.Save() this right aligned tables seem to be left aligned. (see pdf) These Tables have no fixed column - width, because I’m filling them programmaticall with different Text in different length. I formatted the Text in the tables I’m reffering to with red forecolour, so you can easily identify it.
Please tell me if there is a solution for this problem, or maybe you can tell me a workaround.
Thank you very much.
Peter
PS: I’m sorry that the doc is in german…

Hi

Thanks for your inquiry. I cannot reproduce the problem using the latest version of Aspose.Words (6.6.0). You can download this version from here:
https://releases.aspose.com/words/net
So please upgrade to the newer version.
Best regards,

Please retry it with the attached document. Retesting it, i found out, that changing one letter in word and saving it, and aftwards printing it again with asopose fixes the problem. Only the original document has the problem. We now also tried to call Document.UpdateTableLayout(), but the problem still resides.
We are using Version 6.6.
THX.
PS. Seems to be, that the table didn’t get resized fitting the new text length. Maybe this is a hint you can need, to understand the problem. We change the text programmatically with the Range.Replace function. …

Hi

Thank you for additional information. I managed to reproduce the problem on my side. You will be notified as soon as it is fixed.
Best regards,

I now have the same problem with another table which should resize vertically too. Maybe one and the same problem maybe not, so i decided to post it, with an example attached.

THX.

Hi

Thank you for additional information. You will be notified as soon as it is fixed.
Best regards,

Hi,

Are there any news regarding to my problem? The Dead Line for my project is now pretty near and I need to finish the documentation part.

Thx.

Hi

Thanks for your request. Unfortunately, the issue is still unresolved. You will be notified as soon as it is fixed.

Best regards,

Hi,

Are there any news regarding to my problem? The Dead Line for my project was on 1st January and the customers are really annoying. Please help.

Thx.

Hi
Thanks for your request. Unfortunately the issue is still unresolved, and currently I cannot provide you any reliable estimate regarding this issue. But you can try using the following code to work this problem around:

// Open document
Document doc = new Document("Invoice2.docx");
// 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);
}
doc.SaveToPdf("out.pdf");

Best regards,

Hi

Thank you for this little workaround. This solved my problem with the vertically size.

However i still have the problem with the column size. Is there a AutoFitColumns() or AutoFitCell() method or a adequate workaround available? Or maybe something like AutoFit to content like MS Word 2007 has it?

Thx.

Hi

Thanks for your inquiry. Unfortunately, there is no way to specify “Auto-fit to content” option of table cell using Aspose.Words. I linked your request to the appropriate issue; you will be notified as soon as this feature is supported.
Best regards,

Hi,
Are there any news regarding my problem?
thx.

Hi

Thanks for your inquiry. Unfortunately, the problem is still unresolved. I added your request into my monthly report. So the priority of this issue will be increased. We will let you know once there is some progress with this issue.
Best regards,

I Hope you have soon good news for me! Our customers are really upset by now.
Any news?
Bets regards.

Hello

Thanks for your request. Unfortunately the issue is still unresolved. We will be sure to inform you of any developments regarding this issue. Sorry for inconvenience.
Best regards,

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

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