cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 2020 for Eclipse - Java - Custom paper size for Zebra Label Printer

diegofava
Explorer
0 Kudos

Good morning,

I have an issue with my Java application built with the Java SDK of Crystal Reports version for Eclipse (2020).

I'm trying to print labels with a Zebra Label Printer (ZLP).

I need to use a custom Paper Size 9 cm x 6 cm, and I'm trying to set this information directly in the rpt file in the designer (SAP Crystal Reports 2020).

My goal is to get the PrintOptions object from the report (reportClientDocument.getPrintOutputController().getPrintOptions())

and get the PageSize property, with a non-standard value (such as 0: useDefault, or 256: user), so I may be able to know that on that report there is a custom paper size set, and I would override the Paper Size value on the PrintReportOptions object, so that the physical printer's default paper size will be used.

This seems to be IMPOSSIBILE, because if I define a custom paper size on a printer on my machine, and set it on the report in the designer, when I open the report in my runtime Java engine, the value of the paper size on the reportClientDocument object is 1 (PaperLetter !!).

I know that the "standard" paper sizes have an ENUM value, between 1 and 41, listed in the PaperSize class, I only need to obtain a value out from this range in my runtime engine.

What am I doing wrong?

This are my screens of the designer (CR2020):

- Page setup:

diegofava_0-1709652375700.png

 

- Print Options:

diegofava_1-1709652375642.png

The main problem is that a wrong paper size is send to the Zebra Label Printer, so the print is broken.

This issue was not present with Crystal Reports 2008 runtime Engine (.NET)

Thanks in advance for any help,

Diego

Accepted Solutions (0)

Answers (0)