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.
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.
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.
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.
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
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();
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?
<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>
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?
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.
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.