SheetRender output changed between cells 2.5.4 and 7.0.0

Hi,


I’m attempting to move our code over to the new API and have noticed that sheets are rendered differently between 2.5.4 and 7.0.0.
If I render a sheet with setPaginate(false)/setOnePagePerSheet(true) the resulting images sizes and contents are inconsistent.

The first sheet seems to be very close to the same size and contains the data that it should. From the second sheet onwards the horizontal size seems to vary between too small so some of the data is missing or too large so there are large empty spaces either side of the data.

I’ve attached several images illustrating the problem.

Regards,
Henrick

Hi,


Could you try our latest fixed version v7.0.0.3:
https://forum.aspose.com/t/125099

If you still find the issue, kindly attach the input Excel and output PDF file(s) to show the issue. We will check it soon.

Thank you.

Hi,


I’ve just verified that 7.0.0.3 still has the issue.
The spreadsheet is attached to this post and the output to my original post.

Regards,
Henrick

Hi,

I have tested your issue and found it, there is some data missing in the output image when I set one page per worksheet option on for the second worksheet (for test).

We need to evaluate your issue. I have logged your issue with an id: CELLSJAVA-30479. We will look into it soon.

Thank you.

Hi,

We have fixed this issue. Please download: Aspose.Cells for .NET v7.0.1.1

Hi,

We are sorry, the provided fix is for .net version but you need java version. We will provide a fix for Java version soon today.


Hi,

Please try the latest version/fix v7.0.1.1 that fixes your issue.

<o:p></o:p>


Thank you.

Hi,


Sorry for the slow reply. I’m just back from holiday.
Thanks for the fix, the sheet height and width look fine now.
There does appear to be another problem - some columns where the data fitted correctly in 2.5.4 show hashes in 7 onwards indicating that the data is too wide for the column. The samples attached to this thread show the problem.

Regards,
Henrick

Hi Henrick,


Please give us your sample Excel file containing a sheet only for which issue can be reproduced using Sheet-to-Image feature. Also attach the output image here. It will help us to isolate this issue to figure it out soon.

Thank you.

Hi,


The Excel file is attached to the third post in this thread (link) and an output image showing the problem is attached to the first post - aspose70021.png

Regards,
Henrick

Hi,


I have tested your issue with your template file with v7.0.1.3: Please download: Aspose.Cells for Java v7.0.1.3, it works fine. I could not find any issue. Here is my sample code and please find attached the output image file.

Sample code:
//Instantiate a new workbook with excel file path
Workbook book = new Workbook(“bb2010.xlsx”);
//Create an object for ImageOptions
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
//Set the format type of the image
imgOptions.setImageFormat(ImageFormat.getPng());
imgOptions.setOnePagePerSheet(true);
//Get the second worksheet.
Worksheet sheet = book.getWorksheets().get(“Sales Budget”);
//Create a SheetRender object with respect to your desired sheet
SheetRender sr = new SheetRender(sheet, imgOptions);
for (int j = 0; j < sr.getPageCount(); j++)
{
//Generate image(s) for the worksheet
sr.toImage(j, “my_sheetimg_” + j + “.png”);
}

Please try v7.0.1.3.

Thank you.

Hi Amjad,


Thanks for the speedy reply.
I’ve run your sample code with 7.013 and still have the problem. Also a lot of the numeric cells now have a trailing bracket that shouldn’t be there.
I’ve attached the output from my test.

Regards,
Henrick

Hi,


I can notice the issue regarding trailing bracket on the right side of the value. I cannot find “######” issue, you may see my attached screen shot.

Anyways, I have reopened your issue i.e. “CELLSJAVA-30479” again, we will figure it out soon.

Thank you.

Hi Amjad,


The text looks different between your output and mine.
Could this be down to font differences between our environments? I’m running the test on a Windows 7 machine using jre1.4.2_13. Is there any debugging that I can switch on to give you more information?

Regards,
Henrick

Hi,


I am using jdk1.5 version of Aspose.Cells for Java v7.0.0.3 on Windows 7.

We will check your issue further and get back to you soon.

Thank you.

Hi,

With JDK1.4 and JDK1.7, you must specify the correct font path when
using features such as auto-fit, rendering to pdf or image, …



For your given file, we can reproduce the “###” issue when no font
path be specified. When set the proper font path, we can get the correct
result.


However, we can find the issue of trailing bracket for sheet2image, we will figure it out soon.

To set font path, please use CellsHelper.setFontDir(), setFontDirs() or setFontFiles() etc.




Hi,


Please try the new fix: v7.0.1.5


<span style=“font-family:“Calibri”,“sans-serif”;mso-fareast-font-family:
“Times New Roman”;color:black”>We have fixed the issue of trailing bracket. For
“###", as we had said, you must specify the correct font path for JDK1.4
and 1.7.<span style=“font-size:10.0pt;font-family:“Tahoma”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:black”><o:p></o:p>


Thank you

Hi,


Thanks for the quick response. The closing bracket fix in v7.0.1.5 looks good.

We never used to specify a font path for v2.5.4 and earlier so was that a consequence of moving to your 7.n.n codebase? Are there any other settings that now need to be explicitly made that did not before?

Regards,
Henrick

Do you say that you do not give font path using with v2.5.4, which actual version/fix you used, could you tell? Also could you confirm that v2.5.4.x works fine on jdk1.4 or jdk1.7 without specifying the font path? You may give us previous sample code/application, template files with all the details.


We will check it.

Thank you.

Hi,


The first version that we used was 2.5.1. I have never specified the font path up until now - none of the documentation that I had seen suggested that it needed to be set.

Regards,
Henrick