Problemi in pdf conversion

Hi there, I’ve got a docx (well, it’s actually a set of docx with the same structure) which consists of a table with many different kinds of row. I’m using Aspose.Words just to convert it to pdf. I open it and simply save it without setting any option.
As you can see from the attachments the resulting pdf shows some rows shifted down and disappearing.

Can you help me someway?

Thanks a lot,
Francesco Baruchelli

Hi Francesco,

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
As a workaround you can try using like the following:

Document doc = new Document(@"Test001\0896500CAR1000027787_ok.docx");
// Get collection of tables
NodeCollection tables = doc.GetChildNodes(NodeType.Table, true);
// loop through all tables
foreach(Table table in tables)
{
    // Check if the next node after the tabel is another table.
    if (table.NextSibling != null && table.NextSibling.NodeType == NodeType.Table)
    {
        Table nextTable = (Table) table.NextSibling;
        // Append all rows form the current table to the next.
        while (table.HasChildNodes)
            nextTable.Rows.Insert(0, table.LastRow);
    }
}
doc.Save(@"Test001\out.pdf");

Hope this helps.
Best regards,

Thanks for your answer.
I can’t apply your workaround, since I have something like 5 millions of docs to convert and I’m trying to reduce the number of instructions that are executed. Anyway, I understand that the problem is caused by 2 tables with no other node in between, and since my docs are generated by combining a much smaller number of docs, I used Aspose to preprocess them in order to add a 1 point sized paragraph at the beginning of the ones with a table at the very beginning.
It’s obviously a workaround, and I’m looking forward to having the real solution, but it seems to work.

Ciao,
Francesco

Hi Francesco,

Thank you for additional information. Yes, you are right, the problem is caused by 2 tables with no other node in between. It is perfect that you found another solution of this issue. We will keep you informed about the status of the original issue and let you know once it is resolved.
Best regards,

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