When a cell contains fonts with different sizes, the vertical positioning of the text is incorrect when performing PDF export. A sample spreadsheet, and sample out PDF are attached to demonstrate the problem.
…and another niggly issue in a similar area is that when text is wrapped on centered text, the cell width used appears to be larger than the actual width, resulting in ‘under-wrapping’ and text being cropped at either end in the PDF output. See updated samples attached.
Hi,
Thanks for the quick replies. The new build only partially resolves the issue - it does not crop the text, but the wrapping is still the same, so now it spills out the side of the cells. Putting a box around the cell shows it more clearly - see attached.
Hi,
Center-justify the text (as per attached), and then you’ll see the problem.
Hi,
I am still unable to find this issue using the test code below with the latest version:
Aspose.Cells
for .NET v7.3.2.2
I have attached the screenshot for your reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\mysample.xlsx”;
Workbook workbook = new Workbook(filePath);
PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;
workbook.Save(filePath + “.out2.pdf”, opts);
Screenshot:
Very strange. I’m definitely using 7.3.2.2 (confirmed with a call to CellsHelper.GetVersion), and I get the result attached. Something to do with fonts? I’m using Windows 7 Pro SP1 (64-bit).
Got it. My display settings (Control Panel\Appearance and Personalization\Display) are for medium-sized fonts (125%) - if I set to 100% all is OK - the system font setting is somehow having an impact on the behaviour.
Hi George,
Hi,GeorgeH:Got it. My display settings (Control Panel\Appearance and Personalization\Display) are for medium-sized fonts (125%) - if I set to 100% all is OK - the system font setting is somehow having an impact on the behaviour.George
Thanks for your feedback.
We were able to replicate this issue by setting display font size to 125%. We will look into it and fix this issue.
I have attached the output pdf file and display settings to reproduce this issue.
Screenshot:
Hi,
That’s great - thanks for your quick response on this.
George
Hi,
Thanks for using Aspose.Cells.
You are welcome. Hopefully, this fix will be working fine. Let us know your feedback.
If you find any issue or have any questions, please feel free to post, we will be glad to help you asap.
The issues you have found earlier (filed as CELLSNET-41123) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.