Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Jan 29, 2019 2:03 pm

Hello

I using Spire.XLS version 9.1.14.6040 demo.

Everything was fine, but while checking for PDF conversion I found that there is some kind of bug with data scaling.
It seems that cell data alignment width is not multiplied with scaling ratio (while other stuff like font size, cell height\width are correctly multiplied).


Code:

Code: Select all
var workbook = new Workbook();
workbook.LoadFromFile(...);
workbook.SaveToFile(..., FileFormat.PDF);



Steps to reproduce:

Create empty xls\xlsx document
Create row with lots of wide columns (with total width to guarantee that it will not match page width while printing without scaling)
On Page Layout -> Page Setup -> Page set "Fit to" with 1 pages wide by 1 tall
Ensure that Page Setup settings are saved (Close and reopen file)
Then execute code shown above


Actual result:
All cells data scaled to fit page width, but cell vertical bottom alignment width is not scaled and cells text has proportionless vertical offset to top


Expected result:
All cells data including horizontal and vertical alignments scaled to fit page width (same result as printing into pdf using Microsoft Excel with the same Page Setup)


Please check test.xlsx, converted_by_spire.pdf and converted_by_excel.pdf attached.
Attachments
attachments.zip
(226.3 KiB) Downloaded 194 times

Ozzy
 
Posts: 1
Joined: Tue Jan 29, 2019 9:40 am

Wed Jan 30, 2019 6:13 am

Hi,

Thanks for your inquiry.
I have reproduced your issue and logged it in our bug tracking system.
If there is any update, we will let you know. Apologize for the inconvenience caused.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Return to Spire.XLS