Hi there,
I am facing an issue with justified and left aligned text in cells. In Excel everything works as expected, but as soon as I export it as PDF the justified text is further left than the left aligned one.
image.png (17.4 KB)
JustifiedTextBug.pdf (29.9 KB)
I am using version 24.5.
Cheers
Justus
@justus.herrmann,
Please take the print preview of the sheet in MS Excel and you will notice the output PDF (generated by Aspose.Cells) is same with print preview display. I think you may minimize margins (especially left margin) of the worksheet’s PageSetup before rendering to PDF. See the document for your reference.
https://docs.aspose.com/cells/net/setting-margins/
Thanks for your reply Amjad,
Margins won’t help me here. It’s about the space between the border and the first letter. Have another look at the screenshot (I added some arrows to highlight the relevant area).
image.png (21.5 KB)
Cheers
Justus
@justus.herrmann,
Thanks for the screenshot and further details.
Did you take the print preview of the sheet in MS Excel manually and notice any difference when comparing it with the output PDF page? Could you please zip and attach your input Excel file and output PDF for reference. We will check your issue soon.
Yes I did - it has the correct spacing:
JustifiedTextBugPrintFromMSExcel.pdf (10.3 KB)
This is the Excel and the PDF created with Aspose Cells:
JustifiedTextBug.zip (36.0 KB)
Cheers
Justus
@justus.herrmann,
Thanks for the template XLSX file.
I was able to reproduce the issue as you mentioned by converting your template XLSX file to PDF. I found that justified text is further left than left-aligned text in the PDF, but not in Excel. Although the difference is minor and one has to closely evaluate it to notice it, there is an alignment difference close to the edge (left and right).
Workbook workbook = new Workbook("e:\\test2\\JustifiedTextBug.xlsx");
workbook.Save("e:\\test2\\out1.pdf");
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-55853
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@justus.herrmann,
We are pleased to inform you that your issue has been resolved. The fix will be included in our upcoming release (Aspose.Cells v24.6) that we plan to release in the first half of June 2024. You will be notified when the next version is released.
Awesome ! Thank you so much.
@justus.herrmann
You are welcome. If you have any questions, please feel free to contact us.
The issues you have found earlier (filed as CELLSNET-55853) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi