We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Repeating section content control displays wrong data

Hi,

My scenario is the following:

I have a docx-file that contains a custom XML part. The contents of the XML is mapped to conent controls in the document (plain text and a repeating section inside a table).

When I use Aspose to save my file to docx-format it works fine, all the content controls are correctly showing the data from the XML part.

The problem:

When I try to convert the docx-file to another format (e.g. pdf) the table displays the wrong data. Only the first row from my XML part is repeated on several lines, instead of different values on each line.

I realize this is very similar to the problem raised here:

What I want to achieve ultimately is to replace the custom XML part using Aspose and allow the users to select any supported output format (most importantly pdf).

Is there any way to display the correct data in the table, even when the file is converted to another format?


Best regards,

Hi Daniel,


Thanks for your inquiry. Could you please attach your input Word document and output PDF file showing the undesired behavior here for testing? We will then investigate the issue on our end and provide you more information.

Best regards,

Certainly, here is the input docx and output pdf. The conversion is simply done with this:


//saveFormat = SaveFormat.PDF
SaveOptions options = SaveOptions.createSaveOptions(saveFormat);
doc.save(output, options);

Hi Daniel,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13118. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Thanks for the response.

I’ve found an interesting workaround that makes the table display the correct data. By inserting a content control after the table, the table will be displayed correctly, even when the document is converted to pdf.
I’m attaching a docx file where a text content control has been inserted after the table and the resulting pdf, if you want to verify this. Of course I would like the table to work without a workaround, but I think this shows that this problem could probably be fixed.

Best regards,
Hi Daniel,

Thanks for your inquiry. Well, if you just open original document "PopulateTest.docx" with MS Word 2016 and "Save As" this document (without doing any modification) to DOCX format (see attached "resaved-PopulateTest.docx") and then Save the new DOCX to PDF using Aspose.Words 16.1.0, the output will be as expected in PDF. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

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


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