PrintBitmap PowerScript function
Description
Writes a bitmap at the specified location on the current page.
Syntax
1 |
<span>PrintBitmap</span> ( <span>printjobnumber</span>, <span>bitmap</span>, <span>x</span>, <span>y</span>, <span>width</span>, <span>height</span> ) |
Argument |
Description |
---|---|
printjobnumber |
The number the PrintOpen function |
bitmap |
A string whose value is the file name |
x |
An integer whose value is the x coordinate |
y |
An integer whose value is the y coordinate |
width |
The integer width of the bitmap image |
height |
The integer height of the bitmap image |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. If any argument’s value is null, PrintBitmap returns null.
Usage
PrintBitmap does not change the position
of the print cursor, which remains where it was before the function
was called. In general, print functions in which you specify coordinates
do not affect the print cursor (see the functions listed in See
also).
Examples
These statements define a new blank page and then
print the bitmap in file d:PBBITMAP1.BMP in
its original size at location 50,100:
1 |
long Job |
1 |
1 |
// Define a new blank page. |
1 |
Job = PrintOpen( ) |
1 |
1 |
// Print the bitmap in its original size. |
1 |
<span>PrintBitmap</span>(Job, "d:PBBITMAP1.BMP", 50,100, 0,0) |
1 |
// Send the page to the printer and close Job. |
1 |
PrintClose(Job) |