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

Free Support Forum - aspose.com

Help to capture images on sheet while converting sheet to image

Hi Team,


I am using Java + Aspose(8.5.1.0) for converting sheet to image.

String dataDir = “D:\ASPOSE\”;
Workbook book = new Workbook(dataDir + “MySheet.xlsx”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getPng());
imgOptions.setOnePagePerSheet(true);
Worksheet sheet = book.getWorksheets().get(0);
SheetRender sr = new SheetRender(sheet, imgOptions);
sr.toImage(0, dataDir + “mysheetimg_0.out.png”);
System.out.println(“Images generated successfully.”);

But above code not capturing images present in sheet0.

Please find the attached sheet and image. I am unable to get image on arrow. Could you please assist to get that sheet images inside final image. I need as it is screen shot of sheet0.

Hi,


Thanks for providing template file, sample code and screen shot.

Please try our latest version/fix: Aspose.Cells for Java v8.7.1.3 (attached)
I have tested your scenario/case using your template file and sample code with v8.7.1.3, it works fine.

Let us know if you still have any issue.

Thank you.

Hi Amjad,


Thanks for you quick reply. I tried with latest jar file and I got the images on arrow. But it is not that much clear as when we take the printscreen and past inside the mspaint.
I am unable to read the content on that image. Please find the attached screen shot which get generated with latest aspose jar.

Current image issues :
1. Image should have ‘data points to kick-start your work’, but not complete properly.
2. Arrow images are not clear as like excel
3. Date-Range also not readable

Please find the attached input template and generated image.
Urgent response is really appreciable.

Hi,


Thank you for testing the latest build.

Please note, we have recorded the scenarios from points 1) & 2) as CELLSJAVA-41780 & CELLSJAVA-41781 respectively for further investigation by the product team. Regarding the point 3) you can increase the resolution of the resultant image to get better effect for cell J8. Please check following piece of code and its resultant image as attached.

Java

Workbook book = new Workbook(dir + “MySheet.xlsx”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getPng());
imgOptions.setOnePagePerSheet(true);
imgOptions.setHorizontalResolution(600);
imgOptions.setVerticalResolution(600);
Worksheet sheet = book.getWorksheets().get(0);
SheetRender sr = new SheetRender(sheet, imgOptions);
sr.toImage(0, dir + “mysheetimg_0.out.png”);

Thank you Raza.


I am waiting for first 2 issue solutions. Please keep me updating on it.

Hi,


Please note, the aforementioned tickets are currently pending for analysis and are in the queue with other priority tasks. As soon as we have completed the preliminary analysis, we will share the estimated scheduled for the fix.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for Java v8.7.2.1 for CELLSJAVA-41780 and let us know your feedback.

Please try the new fix for “kick-start your work” disappearing issue.

Please set graphics’s text rendering hints to text-antialias-on for “Date range……” not clear by following code.

imgOptions.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

For picture bright issue, it is not fixed now. We guess your source file (MySheet.xlsx) was not created via excel. The “Brightness” and “Constrast” is not proper.

Please check attachment 1194.zip (will attach soon). In pic.xlsx, the 2 pictures have same brightness and contrast but they look different.

Hi,

Thanks for using Aspose.Cells.

Here is the attachment link as mentioned in the above post.


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


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