cancel
Showing results for 
Search instead for 
Did you mean: 

Printing to a particular tray.

Former Member
0 Kudos

Hi All,

Requirement: Need to print A5 labels to a particular tray.

Printer: HP LJ 2015.

The printer has got 3 trays.

Manual Feeder

Tray 2 - A4 letterhead

Tray 3 - A5 sticky labels

We are using a copy of the device type POST2 to print A5 sticky labels. ZPOST5 with a few additional changes to accommodate A5 label printing. The device type works well with all hp models except HP LJ 2015. The problem is that the letterhead and the sticky labels will print from the same tray. Either tray 2 or tray 3 . We want to print Letterheads to Tray 2 and Labels to Tray 3.

I am trying to figure out the hexadecimal code to force print the labels to print to Tray 3 only. Following are the present settings for the device type ZPOST5 (The good one). This device type is used to print A5 Labels to tray 3 or tray 4

TRY01 203020536574496E70757454726179

TRY02 203120536574496E70757454726179

TRY03 203320536574496E70757454726179

TRY04 203220536574496E70757454726179

Printer initialization code

<< /ManualFeed false /MediaPosition null >> setpagedevice

userdict /lms

currentpagedevice /InputAttributes get 4 known { 4 }ifelse put

currentpagedevice /InputAttributes get lms get setpagedevice

<< /InputAttributes << /Priority [lms] >> >> setpagedevice

<< /Policies << /PageSize 7 >> >> setpagedevice

I created a copy of this device type and tried to force print it to tray 3 using the following setting. I deleted the entries Try01,02 and 04.

TRY03 203320536574496E70757454726179

but it doesnt seem to work. I tried different options like 203320536574496E70757454726179 and 203520536574496E70757454726179 but it didnt budge.

The print seems to follow the tray settings of the printer instead. Tray settings.

Tray 1 - Any size any type

tray 2 -Any size any type

tray 3 -Any size any type

The above settings prints the labels and the letterhead to tray 3. Similarly, both starts printing to tray 2 if we change the tray types in the printer.

Is there any hex code that I can use to tell sapscript to look for only tray 3 in the printer for the selected device type

Thanks in avance for you r

Accepted Solutions (0)

Answers (1)

Answers (1)

aidan_black
Active Contributor
0 Kudos

Hi,

With sapscript, unless you put the tray setting into the sapscript form itself, then no command is sent to the printer. So you should restore the original settings to the TRYxx print controls in the device type. In the sapscript form, do the following setting:

se71 -> <Form Name> -> Pages -> Print Attributes -> Resource Name: TRY03

Regards,

Aidan

Former Member
0 Kudos

Hi Adian,

Thanks for your reply. We cant make any changes to the sapscript as we want the printing to be flexible to print to the tray settings specified in SPAD This being the case, the label should follow the tray settings configured in SPAD. Therefore, the other option is to force the device type to choose only tray 3. I am trying to figure out the hexadecimal code for TRAY 3 in a HP LJ 2015 printer.

Cheers!!

aidan_black
Active Contributor
0 Kudos

Hi,

The sequence in print control TRY03 should be the correct one. To get the tray selection in SPAD to work for sapscript, you have to apply the following note:

1570644 - Tray selection in SAPscript using output device

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

The paper tray is selected as specified in the spad tray settings for all hp printers except the HP LJ 2015 printer. This is the reason I am trying to create a new device type which allows printing only to tray 3. I've unsuccessfully tried different hex codes based on the existing hp device types. Tried to look for the hex code in a Laserjet programming guide but couldnt find it yet. Any ways to identify the correct hex code for tray 03 in hp printers. Thanks.

aidan_black
Active Contributor
0 Kudos

Hi,

For HP laserjet printers in general, the command for tray 3 is:

In Ascii, it is: \e&l5H

In HEX, it is: 1B266C3548

If some different command sequence is needed for this printer, you will need to check the printer guide or check with HP.

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

Thanks very much. Lemme do a test with this hex code and will get back to you.