Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Syntax 2 For printing a visual object in a print job – PB Docs 2019 – PowerBuilder Library

Syntax 2 For printing a visual object in a print job – PB Docs 2019

Syntax 2 For printing a visual object in a print job

Description

Includes a visual object, such as a window or a graph control, in
a print job that you have started with the PrintOpen function.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

Argument

Description

objectname

The name of the object that you want to print. The
object must either be a window or an object whose ancestor type
is DragObject, which includes all the controls that you can
place in a window.

printjobnumber

The number the PrintOpen function assigns to the
print job

x

An integer whose value is the x coordinate on the
page of the left corner of the object, in thousandths of an
inch.

y

An integer whose value is the y coordinate on the
page of the left corner of the object, in thousandths of an
inch.

width

(optional)

An integer specifying the printed width of the
object in thousandths of an inch. If omitted, PowerBuilder uses
the object’s original width.

height

(optional)

An integer specifying the printed height of the
object in thousandths of an inch. If omitted, PowerBuilder uses
the object’s original height.

Return value

Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, Print returns null.

Usage

PowerBuilder manages print jobs by opening the job, sending data,
and closing the job. When you use Syntax 2, you must call the PrintOpen
function and the PrintClose or PrintCancel functions yourself to manage
the process. For more information, see PowerScript Reference.

Print area and margins

The print area is the physical page size minus any margins in
the printer itself. Depending on the printer, you may be able to
change margins using PrintSend and printer-defined escape
sequences.

Examples

This example prints the CommandButton cb_close in its original
size at location 500, 1000:

This example opens a print job, which defines a new page, then
prints a title using the third syntax of Print. Then it uses this syntax
of Print to print a graph on the first page and a window on the second
page:

See also

Print in the section called “Print” in PowerScript Reference

PrintCancel

PrintClose in the section called “PrintClose” in PowerScript Reference

PrintOpen in the section called “PrintOpen” in PowerScript Reference

PrintScreen in the section called “PrintScreen” in PowerScript Reference


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x