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

Free Support Forum - aspose.com

Justified Alignment - PDF


We are facing an alignment issue when we try to generate PDF from an XL. All the Cells are justified in the XL Template. But when the PDF is generated, the justified alignment is lost (Please refer to the Attachment for XL template and generated PDF).

Version of Aspose Jar : aspose-cells-

Is there a way to do some code level changes to retain the same format in PDF (Same as the XL). This will help us in retaining the older version of Jar and still continue to meet our requirements.

Thanks a lot in Advance!


Please try our latest version v7.1.2 that we released now.

If you still find any issue, kindly attach your template Excel file, we will evaluate your issue soon.

Also, I am afraid, we cannot help you much regarding older version e.g 2.4.2.x. If there is any issue with the latest version v7.1.2, we can provide you the fixed version. Also, we cannot provide any fix based on the older versions.

Thank you.


Thanks for the immediate response.

We have tried a logic(PFB) to manually set the justified alignment for a set of cells from Java. But that does not seem to work as expected. Can you please point out the issue in the following code snippet.



InputStream inputStream = new FileInputStream("D:\\Aarthee-WS\\MLI_Enh\\MailService\\src\\News.xls");

Workbook wb = new Workbook();


Style s = wb.getDefaultStyle();




Worksheet ws = wb.getSheet(0);

for (int i = 0; i <= 15; i++)


for (int j = 0; j < 15; j++)


Cell cell = ws.getCell(i, j);






An early response would be appreciated!


Your code looks ok and it seems to be a bug in older versions.

Please download and try the latest version:

Aspose.Cells for Java 7.1.2

You will need to upgrade your code.


Sorry for bothering you too much.

Aspose - Alignment Issue,

Multithreading issue.

Shapes rendered properly.

Aspose 7.1.2 - Alignment Fixed,

Multithreading fixed,

Shapes not rendered properly

The above mentioned constraints stops us from using Aspose 7.1.2. Hence we have decided to continue using an advanced version (in which alignment and shapes issues are fixed) and do a fix from our end for Multithreading issue alone.

Is it possible for you to let us know in which version of jar, the alignment issue was fixed ?

Appreciate your timely support!


Please send us template file to us about shapes. We will look into it and the get back to you asap.


The issues were already raised and the best possible fix had already been given by Aspose team.

<A href="https://forum.aspose.com/t/118391</A>.</P> <P>The above link explains better about the shapes issue history.</P> <P>Advanced version that we had requested can be any version higher than Aspose which does not have shapes rendering and alignment issues. Can you please help us in identifying the version of the jar where alignment issues and shapes issues do not persist?</P> <P>Thanks for the co-operation!</P>


Please visit this link and see the release notes of each release. These notes will let you know what has changed when.