Select print tray from code

1
0
-1
Help I need to thicken from the code the tray in which I want to print and use paper.source without getting any results.

Question Tags: 

Answers

flores isidro answered Select print tray from code

1
0
-1
SORRY
This is an application in power builder.

I'm using PB 11.5

I use a dw where I have the information to print

And the printer is an HP laserjet p3015

 

This is my code

 

dw_1.Modify("DataWindow.Print.Orientation=2")
dw_1.Modify("DataWindow.Print.Paper.Size=256")
dw_1.Modify("DataWindow.Print.CustomPage.Length=2160")
dw_1.Modify("DataWindow.Print.CustomPage.Width=2790")
dw_1.Modify("DataWindow.Print.Margin.Bottom=1")
dw_1.Modify("DataWindow.Print.Margin.Left=1")
dw_1.Modify("DataWindow.Print.Margin.Right=1")
dw_1.Modify("DataWindow.Print.Margin.Top=1")
dw_1.Modify("DataWindow.Print.paper.source=2")

 

It takes all the configuration that you need to except the paper.source
greetings thank you

 

 

 

 

 

Daryl Foster answered Select print tray from code

1
0
-1

I've found in the past that the paper.source enumerations Powerbuilder uses may not correspond with specific printer driver values.

A few years ago I used an evaluation program from Powerwhizz to find the driver specific values. We needed to print from Tray 3 on various printers which used different drivers.  For HP 4100 and 4050 the value was 260 and with the HP Universal driver it was 261 so we used:

either

dw_1.Modify("DataWindow.Print.paper.source=260")

or

dw_1.Modify("DataWindow.Print.paper.source=261")

I can't find the Powerwhizz site anymore but if this is your problem there should be a way to find the specific printer driver tray values though some api calls.