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

Free Support Forum - aspose.com

Spaces between the grids when upgraded Aspose from 15.5 to 21.4

Hi,

We are encountering additional formatting issues when we upgraded Aspose from 15.5 to 21.4 recently and the documents have spaces between the grids when generated to PDF.

  • Testing in Aspose 21.4 Sample project:- There is a space between the grids. Screenshot below,

sample project 21.4.png (81.6 KB)
2nd template_sample project_21.4.png (50.9 KB)

  • Testing in Aspose 15.5 Sample project:- There is no space between the grids. Screenshot below,

sample project_15.5.png (61.9 KB)
2nd template_sample project_15.5.png (37.7 KB)

I have created two projects with related versions which generate PDFs as we do in our app. The template and steps are the same. Both using the same templates which are in the zip folder. I attached 2 templates for your reference.
Zip Folder: Aspose sample project.zip (2.1 MB)

The template is working fine in 15.5 but it causing the issue in 21.4.

We would like to ask you what changed or what we do wrong/ need to change in order to make it work. We would like to have some workaround instead of changing it in every template.

Thank you

@jcash_casenetllc_com

We have tested the scenario using the latest version of Aspose.Words for Java 21.7 and have not found the shared issue. So, please use Aspose.Words for Java 21.7.

Please get the 30 days temporary license and apply it before importing document into Aspose.Words’ DOM.

Thank you @tahir.manzoor for the update.

Does it confirm that it does not work in 21.4?

I’m currently doing testing in 21.7.

@jcash_casenetllc_com

We did not test your case with old version of Aspose.Words for Java. Please note that we do not provide support for older released versions of Aspose.Words.

The latest version of Aspose.Words for Java 21.7 generates the desired output. Please check the attached output documents. Result.pdf (116.0 KB)
Result.docx (530.3 KB)

@tahir.manzoor Thanks for the update.
I don’t see any difference between the previous one which i was given and Result.pdf (116.0 KB).
I still see the Gaps so please check and let us know whether these gaps can get rid of in the latest 21.7 version.

Please let us know if you need zoom sessions to discuss this issue.

Thanks.

@jcash_casenetllc_com

Your output document has Set and IF fields after mail merge. Please use following code example to get the desired output.

mailMerge.setCleanupOptions(MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS |
        MailMergeCleanupOptions.REMOVE_CONTAINING_FIELDS |
        MailMergeCleanupOptions.REMOVE_UNUSED_FIELDS |
        MailMergeCleanupOptions.REMOVE_UNUSED_REGIONS);
mailMerge.execute(new String[]{}, new Object[]{});
mailMerge.executeWithRegions(new DataSet());
doc.updateFields();

for(Field field : doc.getRange().getFields())
{
	if(field.getType() == FieldType.FIELD_SET)
		field.unlink();
}

for(Paragraph paragraph :(Iterable<Paragraph>)doc.getChildNodes(NodeType.PARAGRAPH, true))
{
    if(paragraph.getNextSibling() != null && paragraph.getPreviousSibling() != null
    		&& paragraph.toString(SaveFormat.TEXT).trim().length() == 0)
    	paragraph.getParagraphBreakFont().setSize(1.0);
}

doc.save(fileOutput + "Result.docx");
doc.save(fileOutput + "Result.pdf");