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

Free Support Forum - aspose.com

Font size increasing for left justified numbers

Dear team,
For the numbers which are left justified or left aligned in spreadsheet, the font size is getting increased while converting the spreadsheet to a pdf file.

We have attached the input excel file and the output pdf file.

Regards,
Gopal

Hi Gopal,

Thanks for your posting and using Aspose.Cells.

I was not able to observe this issue. I manually converted your input.xlsx to pdf using MS-Excel 2010 and then compared the output of both Excel pdf and Aspose.Cells pdf after zooming both of them to 100% and both looks same.

I have attached the Excel pdf and screenshot comparing them for your reference.

Screenshot:

Team,
We are still getting the same issue. Pls look into this in all possible scenarios.

Below is a chunk of code which is used.

body { margin: 0 0 0 0; padding:0 0 0 0 }
td,div { font-family:Tahoma;font-size:10pt;vertical-align:top }
/* Copyright IBM Corp. 2013 All Rights Reserved. */
body { margin: 0 0 0 0; padding:0 0 0 0; overflow:hidden; }
.transcript { background-color:#d2d2d2; }
.messageBlock { padding-left:10px; padding-right:10px; margin-bottom:3px }
.message { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; white-space:pre-wrap;}
.messageCont { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap;}
.other { font-size:11px;color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.myself { font-size:11px;color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.system { font-size:11px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap; }
.showTimestamp { padding-left:20px; font-size:11px; float:right; color:#999999;font-style:normal;font-weight:normal; }
.other1 { font-size:11px; color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other2 { font-size:11px; color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other3 { font-size:11px; color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other4 { font-size:11px; color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other5 { font-size:11px; color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other6 { font-size:11px; color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other7 { font-size:11px; color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.highlight { background-color:#bed6f8; }
.datestamp { padding-right:0px; font-size:11px; cursor:default; margin-bottom:1px; background-color:#c0c0c0; width:100%; float:left; text-align:right; color:#ffffff; font-weight:bold; font-style:italic; }
#chatAlert { float:left; border-bottom:1px solid #E8D091; padding:6px; width:100%; color:#A5754C; }
#chatAlertImage { float:left; }
#chatAlertText { float:left; margin-left:6px; }
#chatAlertClose { float:right; margin-right:10px; padding-right:6px; margin-top:0px; }
#chatAlertText a { color:#A5754C; }
#chatAlertText a:hover { color:#A5754C; text-decoration:none; }

.tsDisplay { display:block }.dsDisplay { display:block }

Aspose.Cells.Workbook wb1 = new Aspose.Cells.Workbook(ms, new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Auto));
foreach (Aspose.Cells.Worksheet ws in wb1.Worksheets)
{
ws.AutoFitRows(true);
//ws.AutoFitColumns();
}
Aspose.Cells.PdfSaveOptions pso = new Aspose.Cells.PdfSaveOptions();
pso.DefaultFont = "Calibri";



Team,
We are still getting the same issue. Pls look into this in all possible scenarios.

Below is a chunk of code which is used.

body { margin: 0 0 0 0; padding:0 0 0 0 }
td,div { font-family:Tahoma;font-size:10pt;vertical-align:top }
/* Copyright IBM Corp. 2013 All Rights Reserved. */
body { margin: 0 0 0 0; padding:0 0 0 0; overflow:hidden; }
.transcript { background-color:#d2d2d2; }
.messageBlock { padding-left:10px; padding-right:10px; margin-bottom:3px }
.message { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; white-space:pre-wrap;}
.messageCont { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap;}
.other { font-size:11px;color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.myself { font-size:11px;color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.system { font-size:11px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap; }
.showTimestamp { padding-left:20px; font-size:11px; float:right; color:#999999;font-style:normal;font-weight:normal; }
.other1 { font-size:11px; color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other2 { font-size:11px; color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other3 { font-size:11px; color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other4 { font-size:11px; color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other5 { font-size:11px; color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other6 { font-size:11px; color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other7 { font-size:11px; color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.highlight { background-color:#bed6f8; }
.datestamp { padding-right:0px; font-size:11px; cursor:default; margin-bottom:1px; background-color:#c0c0c0; width:100%; float:left; text-align:right; color:#ffffff; font-weight:bold; font-style:italic; }
#chatAlert { float:left; border-bottom:1px solid #E8D091; padding:6px; width:100%; color:#A5754C; }
#chatAlertImage { float:left; }
#chatAlertText { float:left; margin-left:6px; }
#chatAlertClose { float:right; margin-right:10px; padding-right:6px; margin-top:0px; }
#chatAlertText a { color:#A5754C; }
#chatAlertText a:hover { color:#A5754C; text-decoration:none; }

.tsDisplay { display:block }.dsDisplay { display:block }

Aspose.Cells.Workbook wb1 = new Aspose.Cells.Workbook(ms, new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Auto));
foreach (Aspose.Cells.Worksheet ws in wb1.Worksheets)
{
ws.AutoFitRows(true);
//ws.AutoFitColumns();
}
Aspose.Cells.PdfSaveOptions pso = new Aspose.Cells.PdfSaveOptions();
pso.DefaultFont = "Calibri";



Regards,
Gopal

Hi Gopal,

Thanks for your posting and using Aspose.Cells for .NET.

We were able to observe this issue. The font size of left justified numbers are little increased than the right justified numbers. We tested it with the following code using the latest version, but the issue still occurs.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42446.

I have attached the output pdf and screenshot for a reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\input.xlsx”;


Aspose.Cells.Workbook wb1 = new Aspose.Cells.Workbook(filePath, new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Auto));


foreach (Aspose.Cells.Worksheet ws in wb1.Worksheets)

{

ws.AutoFitRows(true);

// ws.AutoFitColumns();

}

Aspose.Cells.PdfSaveOptions pso = new Aspose.Cells.PdfSaveOptions();

pso.DefaultFont = “Calibri”;


wb1.Save(filePath + “.out.pdf”, pso);


Screenshot:

Hi,

Thanks for using Aspose.Cells.

Please download and try the fix: Aspose.Cells
for .NET v7.7.2.6
and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-42446) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.