Various Printing Issues

Dear Aspose Support Team

We are facing various printing issues.
We have two similar files: (i) Anna_Karenina.xlsx and (ii) AK_2041.xlsx
For testing purposes, we are printing each file/workbook three times (A, B, C); see also code snippet below:
A: directly after creating the workbook
B: after saving the workbook
C: after reloading the saved workbook

...
printWorkbook(); // A
tmpPath = Files.createTempFile(TEMP_FILE_PREFIX, FILE_SUFFIX_XLSX);
workbook.save(tmpPath.toString());
printWorkbook(); // B
workbook = new Workbook(tmpPath.toString());
printWorkbook(); // C
...

private void printWorkbook() throws Exception {
	PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService();
	String defaultPrinterName = defaultPrintService.getName();
	ImageOrPrintOptions printOptions = new ImageOrPrintOptions();
	WorkbookRender wr = new WorkbookRender(workbook, printOptions);
	wr.toPrinter(defaultPrinterName);
}

We have done that for various (default) printers:

  • Microsoft Print to PDF
  • Microsoft XPS Document Writer
  • 5 different physical printers

Logo Issue:
The quality of the logo on the print-outs is bad. This is true for all printers, even XPS and PDF. This seems not to be an issue of the picture file: when we open the .xlsx files in Excel and print from there, the quality is good.

Missing Content Issue:
The following issues happen only on 4 out of the 5 physical printers. On all 4 printers the issues are the same. One physical printer, XPS and PDF are OK.
For Anna_Karenina:

  • prints A & B: on pages 2 and 3 only the logo is printed, the rest of the content is not printed
  • print C: on pages 2 and 3 the footer is not printed

For AK_2041:

  • prints A & B: on pages 2 and 4 only the logo is printed, the rest of the content is not printed
  • print C: on pages 2 and 4 footer is not printed; on page 4 the total rows are not printed

Not sure if this is relevant, but the pages with issues seem to coincide with those pages that have cells with grey background.

Attached you find :

  • Anna_Karenina.xlsx and AK_2041.xlsx (created with Aspose Cells for Java 20.6.3)
  • PDF_Print_…pdf (print-outs from Microsoft Print to PDF -> OK apart from logo quality)
  • XPS_Print_…oxps (print-outs from Microsoft XPS Document Writer -> OK apart from logo quality)
  • Scan_Physical_Print_…pdf (scan of physical print-outs from one problematic physical printer, this is representative for all 4 problematic physical printers)

Xlsx.zip (109.1 KB)
PDF_Print_Anna_Karenina.zip (8.9 MB)
PDF_Print_AK_2041.zip (5.8 MB)
XPS_Print_Anna_Karenina.zip (5.8 MB)
XPS_Print_AK_2041.zip (4.0 MB)
Scan_Physical_Print.zip (504.5 KB)

@awepler,
We have observed the issues and logged them in our database for investigation. You will be notified once any update is ready to share.

This issue is logged as:
CELLSJAVA-43249 - Printing issues while using physical printers, XPS and PDF printer

@awepler,

To locate the issue, please try to print the files (one is changed Orientation to portrait, the other is changed Background to solid gray. see the attachment “Orientation_Background.zip”) with your A, B, C print process and give us the results.
Orientation_Background.zip (239.2 KB)

Please find attached the requested print results:
PDF_Print_Anna_Karenina.zip (3.9 MB)
PDF_Print_AK_2041.zip (3.1 MB)
XPS_Print_Anna_Karenina.zip (2.9 MB)
XPS_Print_AK_2041.zip (2.5 MB)
Scan_Physical_Print.zip (1.1 MB)

Logo Issue:
Logo quality is still bad (expected, as there was no change).

Missing Content Issue:
One physical printer, XPS and PDF are still OK.

For Anna_Karenina:

  • version SolidGrayBackground seems OK
  • version PortraitOrientation: on pages 2 and 3 the footer is not printed

For AK_2041:

  • version SolidGrayBackground seems OK
  • version PortraitOrientation: on pages 2 and 4 footer is not printed; on page 4 the total rows are not printed

Please note that this time there seems to be no difference between prints A, B and C. I think this is because you had to save the workbooks and I had to open them in order to print. So, in this case A, B and C were actually C scenarios. In the original scenario, the workbook was created from scratch (based on a template) with Aspose and A was printed before ever saving the workbook. It seems that saving and re-opening the workbook changes something that is relevant for printing.

The file sizes for the PDF and XPS print-outs are smaller this time; especially for the SolidGrayBackground versions, they are much smaller.

@awepler,

Thanks for the results and findings with details.

We will evaluate your results and get back to you soon.

@awepler,

It seems that it is the pattern style background (see attachment “Screenshot_PatternFill.png”) causes some physical printers not working properly. But we don’t know why it does not work. Is it possible that you can change the pattern style background (e.g as we shared AK_2041_SolidGrayBackground.xlsx") to set solid background which works OK for all the printers we tested?

For the image quality issue, we will try to improve the image quality in the next fix.
Screenshot_PatternFill.png (39.6 KB)

@awepler,

Please try our latest version/fix: Aspose.Cells for Java v20.7.7 (attached)

We have improved the image quality in it.

Let us know your feedback.
aspose-cells-20.7.7-java.zip (7.1 MB)

Thank you for your feedbacks.

We have now found an acceptable colour to be used as solid background. For the time being we can live with this workaround. It might become an issue later on again.

We have also tested your latest version/fix 20.7.7. The image quality is now good.

@awepler,

Yes, kindly keep using the new fix until we enhance the image quality further.

@awepler,

We are pleased to inform you that your issue has been resolved. We will soon provide you the fix after performing QA and incorporating other enhancements and fixes.

@awepler,

Please try our latest version/fix: Aspose.Cells for Java v20.8.8 (attached)

Your issue should be fixed in it. Please try the fix v20.8.7 with your original files(no need to change the pattern style background to solid background).

Let us know your feedback.
aspose-cells-20.8.8-java.zip (7.2 MB)

Thank you for looking into this and providing the latest fix. It seems to be working fine with v20.8.8.

@awepler,

Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

The issues you have found earlier (filed as CELLSJAVA-43249) have been fixed in Aspose.Cells for Java v20.9. This message was posted using Bugs notification tool by ahsaniqbalsidiqui.
You may also get the new version @ Maven repos. (On Premise File Format API Releases | Aspose)