Printing Excel with Image Issue

Hi, I’m trying to print an excel file with an image but the image is missing in the printed output.

Attache file template.xls is the file i am trying to print.

Below is the code:
String fileNameString = “/C:/apache-tomcat-7.0.0/webapps/MyApp/doc/template/template.xls”;
PrintService ps = getDefaultPrintService();
Workbook workbook = new Workbook();
workbook.open(fileNameString, FileFormatType.DEFAULT);
Worksheet worksheet;
for (int i = 0; i < workbook.getWorksheets().getCount(); i++)
{
worksheet = workbook.getWorksheets().get(i);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions ();
imgOptions.setOnePagePerSheet(true);
SheetRender sr = new SheetRender(worksheet, imgOptions);
//Print the worksheet
sr.toPrinter(ps.getName());
}


Hi,

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

We have found this issue. We will look into this issue and provide you a fix asap.

Java


Workbook workbook = new Workbook(path);


Worksheet worksheet = workbook.getWorksheets().get(0);


ImageOrPrintOptions options = new ImageOrPrintOptions();

options.setOnePagePerSheet(true);

options.setImageFormat(ImageFormat.getPng());


SheetRender sr = new SheetRender(worksheet, options);

sr.toPrinter(“doPDF v7”);

Screenshot:

you do support jdk 1.4, right?

Hi,

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

Yes, we do support JDK1.4, 1.5 and 1.6+.

If you download the major version:

Aspose.Cells for Java 7.3.3
, you will find 3 separate folders each for different JDK.

Please Note: For all JDKs later than 1.6 e.g JDK 1.7, you will use JDK1.6

Please check the following screenshot for your reference.

Screenshot:

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


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