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

PrintSend (obsolete) – PB Docs 2018 – PowerBuilder Library

PrintSend (obsolete) – PB Docs 2018

PrintSend (obsolete)

Description

Sends an arbitrary string of characters to the printer. PrintSend is
usually used for sending escape sequences that change the printer’s
setup.

Obsolete function

PrintSend is an obsolete function and is provided for backward
compatibility only. The ability to use this function is dependent upon
the printer driver.

Syntax

Argument

Description

printjobnumber

The number the PrintOpen function assigned to the
print job.

string

A string you want to send to the printer. In the
string, use ASCII values for nonprinting
characters.

zerochar (optional)

An ASCII value (1 to 255) that you want to use to
represent the number zero in string.

Return value

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

Usage

Use PrintSend to send escape sequences to specific printers (for
example, to set condensed mode or to set margins). Escape sequences are
printer specific.

As with any string, the number zero terminates the string argument.
If the printer code you want to send includes a zero, you can use another
character for zero in string and specify the character that represents
zero in zerochar. The character you select should be a character you do
not usually use. When PowerBuilder sends the string to the printer it
converts the substitute character to a zero.

A typical print job, in which you want to make printer-specific
settings, might consist of the following function calls:

  1. PrintOpen

  2. PrintSend, to change the printer orientation, select a tray, and
    so on

  3. PrintDefineFont and PrintSetFont to specify fonts for the
    job

  4. Print to output job text

  5. PrintClose

Examples

This example opens a print job and sends an escape sequence to a
printer in IBM Proprinter mode to change the margins. There is no need to
designate a character to represent zero:

This example opens a print job and sends an escape sequence to a
printer in IBM Proprinter mode to change the margins. The decimal ASCII
code 255 represents zero:

See also

PrintClose

PrintOpen


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