Change in alignment of the merged document with updateFields() and updatePageLayout() calls

Dear Team,

We are using Aspose.Words for java to merge multiple word documents and save the merged document either as doc,docx or rtf. We are also updating the cross references and page layout using updateFields() and updatePageLayout(). But when we make these calls, the alignment of the paragraph is getting changed on the merged document.

If we remove updateFields() and updatePageLayout(), the alignment will be fine in the merged document. But we need to update the cross references if any.

I have attached the code that we are using below. I have also attached the sample input documents.

Could you please suggest what is going wrong in this? If this is a known issue, please let us know by when we can expect a fix for the same. I have also raised an other inquiry as we are facing the same issue when trying to convert to pdf. This is the issue id.

<a href="https://forum.aspose.com/t/48302</a></p><p>Document mainDoc = null;<br> int index = 0;<br> try {<br> for (String filePath : fileLocationsList) {<br> System.out.println("The file path is ...."+filePath);
if (index == 0) {
mainDoc = new Document(filePath);
} else {
Document appendedDoc = new Document(filePath);
// Set the appended document to appear on a new page.
appendedDoc.getFirstSection().getPageSetup().setSectionStart(SectionStart.NEW_PAGE);
mainDoc.appendDocument(appendedDoc, ImportFormatMode.KEEP_SOURCE_FORMATTING);
}
index++;
}
// Update all the computed Fields for the concatenated Document
mainDoc.updateFields();
// Update all the Page Layouts of the concatenated Document
mainDoc.updatePageLayout();
// Save the updated document in the final result Path
mainDoc.save(mergedFileLocation, SaveFormat.DOCX);
} catch (Exception e) {
LOGGER.severe(e.getMessage());
}

Regards

Pavan

Hi Pavan,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 13.11.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-9359. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Dear Team,

Could you please let us know the timelines (if not accurate at least the approximate timelines) by when we can expect this fix to be available?

Regards

Pavan

Hi Pavan,


Unfortunately, your issue is currently pending for analysis. Please note that, an issue first needs to be investigated to find the exact source of problem and then we investigate the best possible way to fix the issue. So, we can’t provide you any reliable estimate at the moment. Once the issue is analyzed and the root cause is determined, we will then be able to provide you more information. Sorry for the inconvenience.

Best regards,

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


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