home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
vrprt21.zip
/
vrprint.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-12-31
|
165KB
|
3,285 lines
ΓòÉΓòÉΓòÉ 1. VRPrinter Object ΓòÉΓòÉΓòÉ
The VRPrinter Object for VX-REXX* gives you access to complex graphic printing
functionality with VX-REXX v2.1 or greater.
With this library you will be able to create professional style reports and
outputs for your VX-REXX programs with images, boxes and text that can be
justified, right or left aligned or centred. and with documents that use up to
25 different font faces.
The VRPrinter Object allows you to define headers and footers and gives you
access to a list of the printers connected to your work-station, their Job
Properties dialogs and their available printing fonts.
* VX-REXX is a registered trade mark of Watcom International Corporation.
ΓòÉΓòÉΓòÉ 1.1. Whats new in version 2.1 ΓòÉΓòÉΓòÉ
The VRPrinter Object has been ported to VX-REXX version 2.1. This means that if
you still have VX-REXX version 2.0, you should stay with version 1.x of the
VRPrinter Object.
In version 2.1 we have introduced the following new methods:
MoveX
MoveY
PrintWinImage
NewPage will now prepare the job to start a new page from within a table when
the next EndRow call is made.
ΓòÉΓòÉΓòÉ 1.2. Shareware Software ΓòÉΓòÉΓòÉ
DEFINITION OF SHAREWARE SOFTWARE
Shareware Software distribution gives users a chance to try software before
buying it. If you try a Shareware software program and continue using it, you
are expected to register. Individual programs differ on details -- some request
registration while others require it, some specify a maximum trial period.
With registration, you get anything from the simple right to continue using
the software to an updated program with printed manual.
Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as stated
below. Shareware software authors are accomplished programmers, just like
commercial authors, and the programs are of comparable quality. (In both cases,
there are good programs and bad ones!) The main difference is in the method of
distribution. The author specifically grants the right to copy and distribute
the software, either to all and sundry or to a specific group. For example,
some authors require written permission before a commercial disk vendor may
copy their Shareware software.
Shareware software is a distribution method, not a type of software. You should
find software that suits your needs and pocketbook, whether it's commercial or
Shareware software. The Shareware software system makes fitting your needs
easier, because you can try before you buy. And because the overhead is low,
prices are low also. Shareware software has the ultimate money-back guarantee
-- if you don't use the product, you don't pay for it.
When you register the VRPrinter Object you will be sent a registered version of
the DLL by e-mail. This version has the "nag" popup removed and you have the
right to freely distribute software that includes the DLL.
If you are satisfied with the VRPrinter Object we ask you to freely distribute
the shareware version to your freinds and colleagues.
If you have any suggestions for enhancements or find any bugs in the software
please contact us at one of our Contact Addresses
ΓòÉΓòÉΓòÉ 1.3. Registering your license ΓòÉΓòÉΓòÉ
VRPrinter is a "Shareware software program" and is provided at no charge to the
user for evaluation. Feel free to share it with your friends, but please do not
give it away altered or as part of another system. The essence of
"user-supported" software is to provide personal computer users with quality
software without high prices, and yet to provide incentive for programmers to
continue to develop new products. If you find this program useful and find that
you are using VRPrinter and continue to use VRPrinter after a reasonable trial
period of 30 days, you must make a registration payment of $45.00 to ADD
Consulting (CH).
If you have already registered either PRTGRAPH for REXX or PRTGRAFC for C/C++
you can register for $20.00.
You can register through the CompuServe Shareware Registration facility:
GO SWREG registration Number 6200 for new registrations
GO SWREG registration Number 6330 for registered owners of PrtGraph for C
or the PrtGraph C++ Class Library
The registration fee will license one copy for use on any one computer at any
one time. You must treat this software just like a book. An example is that
this software may be used by any number of people and may be freely moved from
one computer location to another, so long as there is no possibility of it
being used at one location while it's being used at another. Just as a book
cannot be read by two different persons at the same time.
Payment of the registration fee gives you the right to distribute programs
that include the object and the DLL without paying any other "run-time"
licenses.
Site-License arrangements may be made by contacting ADD Consulting (CH).
ΓòÉΓòÉΓòÉ 1.4. Distributing the VRPrinter Object ΓòÉΓòÉΓòÉ
Anyone distributing the VRPrinter Object for any kind of remuneration must
first contact ADD Consulting (CH) at our address below for authorization. This
authorization will be automatically granted to distributors recognized by the
(ASP) as adhering to its guidelines for shareware distributors, and such
distributors may begin offering VRPrinter immediately, however ADD Consulting
(CH) should still be advised so that the distributor can be kept up-to-date
with the latest version of VRPrinter.
Registered users are free to distribute programs that use the the VRPrinter
Object with no additional run-time fees.
ΓòÉΓòÉΓòÉ 1.5. Contact Address ΓòÉΓòÉΓòÉ
You can contact ADD Consulting at the addresses below:
ADD Consulting (CH)
Mr. Peter Kanis
Via Suro 9
CH-7403 RhДzБns
Switzerland
Tel: +41 (0)81 630 2011
Fax: +41 (0)81 630 2015
CompuServe: 100275,350 (Peter Kanis)
INTERNET: kanis@ibm.net
ADD Consulting (RUS)
Mr. Michael V. Schelkin
18-29 Molodezhnaya Street
Jukovsky
140160 Moscow Region
Russia
Tel: +7 095 556 8533
Internet: michael@schelkin.msk.ru
ΓòÉΓòÉΓòÉ 1.6. Rights And Limitations ΓòÉΓòÉΓòÉ
ADD Consulting makes no warranties as to the information in this guide.
Additionally, ADD Consulting is not responsible or liable for any loss or
damage of any kind resulting from use of this product.
The Software is protected by international copyright laws. All rights reserved.
No part of the computer program, documentation or related files may be
reproduced photocopied, stored on a retrieval system, or transmitted except as
provided by copyright law or by express permission of the copyright owner.
DISCLAIMER - AGREEMENT
Users of VRPrinter shall accept this disclaimer of warranty:
ADD CONSULTING SUPPLIES THIS PRODUCT AS IS WITHOUT WARANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARANTIES OF
MERCANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ADD CONSULTING ASSUMES NO
LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE
OF THE PRODUCT.
Some jurisdictions do not allow the exclusion or limitations for consequential
or incidental damages, so the above may not apply to you.
ΓòÉΓòÉΓòÉ 1.7. The DEMO program ΓòÉΓòÉΓòÉ
Included in this package is a demonstration program in VX-REXX and its source
code. The demo shows you many of the possibilities offered by the object, but
the limits are set by your imagination.
Figure: Demo Program.
ΓòÉΓòÉΓòÉ 1.8. Setting up a print job ΓòÉΓòÉΓòÉ
Setting up a print job requires several steps:
Include a Printer object on the main window
Choose a printer with the PrinterDialog method
If necessary set the job properties with the JobProperties method
Set the page margins with the SetMargins method
Set up the aspect of header with the SetHeaderMode method
Set up any header text with the SetHeader method
Change any fonts for the lines in the header with the
SetHeaderLineFont method
Set up any footer with the SetFooter method
Open the print job with the OpenPrintJob method
Print your texts, tables, bitmaps etc..
Close the print job with the ClosePrintJob method
Since headers and footers often contain constants like the date or the
document title and variables like the page number, the texts defined for these
can contain special formatting characters.
NOTE
All the input parameters that denote positions are by default in millimetres
or 1/10 inch depending on the Measures property. You can convert from inches
using the formula:
mm = 254 * inch
All the line widths are defined in TWIPS:
1 Point = 20 TWIPS
1 mm = 56.7 TWIPS (rounded to 57 for internal calculation)
Warning:
If you wish to print several documents concurrently (i.e. in parrallel threads
or windows) you must include a printer object on each window.
ΓòÉΓòÉΓòÉ 1.9. Formatting Characters ΓòÉΓòÉΓòÉ
To help define header and footer texts with SetFooter and SetHeader the
following special formatting flags are defined:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé$ ΓöéIf followed by one of the other characters in this tableΓöé
Γöé Γöéit indicates a formatting character follows, otherwise Γöé
Γöé Γöéit is taken as a literal '$' Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöél ΓöéLeft align the following text Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöér ΓöéRight align the following text Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöéc ΓöéCentre the following text Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé@ ΓöéInsert the current date formatted acording to the systemΓöé
Γöé Γöésettings. This is read every time a job is started; so Γöé
Γöé Γöéyou can change the date format from job to job in the Γöé
Γöé Γöésame sesssion. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé# Γöéinsert the current page number (always arabic) Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéΓûî or | ΓöéInsert the title of the document (see OpenPrintJob) Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example
'$Γûî$rpage $#' would give:
Document Title page 1
'$r@ page $#' would give (where date is defined as ISO with '/' separator):
1995/03/18 page 1
Warning:
Formatting characters only apply to the page and table header and page footer
texts.
ΓòÉΓòÉΓòÉ 1.10. Fill Syles ΓòÉΓòÉΓòÉ
Several of the VRPrinter methods refer to a fill style. You can see the effect
of a style for any printer by running the DEMO program and printing the box
styles option. The numbers you pass to any of these methods is translated into
a PATSYM_????? constant, and the output is, to a certain extent, device
dependent. For an idea of what you will obtain see the pictures below.
ΓòÉΓòÉΓòÉ 1.11. Printing on a separate thread ΓòÉΓòÉΓòÉ
Printing is often a lengthy operation and is a good candidate for
multi-threading. However, the Printer Object needs to be present on a Window.
The technique to use if you want to write a code file to perform the actual
printing operation in your VX-REXX program is this
Start a thread passing the "Self" property of the Printer Object NOT THE NAME:
PB_Print_Click:
somSelf = VRGet( "PRT_1", "Self");
threadID = VRMethod( "Application", "StartThread", "printit", somSelf )
return
In the main section of printit.vrx:
Main:
signal on halt
parse arg somSelf
.
.
exit
When calling VRPrinter methods use somSelf as the object name:
PrintStuff:
/***** Open the print job *******************************************/
ok = VRMethod( somSelf, "OpenPrintJob", 'Test Printing');
/***** Print out with text, pictures or anything ********************/
ok = VRMethod( somSelf, "PrintLine", facename, fnt, text);
ok = VRMethod( somSelf, "PrintLine", , fnt, '');
.
.
.
/***** Close the job ************************************************/
ok = VRMethod( somSelf, "ClosePrintJob");
return
Note: This technique can be used to access methods and properties of many
other objects in VX-REXX.
ΓòÉΓòÉΓòÉ 2. VRPrinter properties ΓòÉΓòÉΓòÉ
The following sections describe the properties specific to the VRPrinter
Object.
BottomMargin
ColorEnabled
CurrentDevice
CurrentPrinter
DefaultPrinter
FormHeight
FormName
FormWidth
JobName
LeftMargin
LineSpace
Measures
MinBottomMar
MinLeftMar
MinRightMar
MinTopMar
PageHeight
PageNum
PageWidth
Printing
PrintColor
RightMargin
ShowProgress
TopMargin
Version
WordBreak
The VRPrinter Object inherits its properties from the Descriptive Text object
in VX-REXX. The behaviour of the following properties is the standard (see
VX-REXX programming guide for Descriptive Text):
Autozize
BackColor
Caption
ClassName
ClipSiblings
Enabled
FirstChild
Font
ForeColor
Height
HelpTag
HelpText
HintText
Justification
HWnd
Left
Name
Painting
Parent
Self
Sibling
SiblingOrder
Top
UserData
VertJustification
Visible
Width
WordBreak
ΓòÉΓòÉΓòÉ 2.1. BottomMargin ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> BottomMargin - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
LeftMargin
RightMargin
TopMargin
PageHeight
PageWidth
ΓòÉΓòÉΓòÉ <hidden> BottomMargin - Description ΓòÉΓòÉΓòÉ
The distance of the bottom margin from the lower edge of the page. The measure
is in mm or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.2. ColorEnabled ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ColorEnabled - List ΓòÉΓòÉΓòÉ
Data Type
Boolean
Possible Values
1 (TRUE)
0 (FALSE)
See Also
PrintColor
ΓòÉΓòÉΓòÉ <hidden> ColorEnabled - Description ΓòÉΓòÉΓòÉ
Boolean property indicating whether color printing is enabled or not.
ΓòÉΓòÉΓòÉ 2.3. CurrentDevice ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> CurrentDevice - List ΓòÉΓòÉΓòÉ
Data Type
String
See Also
CurrentPrinter
PrinterDialog
ΓòÉΓòÉΓòÉ <hidden> CurrentDevice - Description ΓòÉΓòÉΓòÉ
The name of the printer device selected for the printer object. This is the
same as the Physical Name seen in printer settings notebook. This is the name
used for printing charts.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.4. CurrentPrinter ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> CurrentPrinter - list ΓòÉΓòÉΓòÉ
Data Type
String
See Also
CurrentDevice
PrinterDialog
ΓòÉΓòÉΓòÉ <hidden> CurrentPrinter - Description ΓòÉΓòÉΓòÉ
The name of the printer selected for the printer object. This is the same as
the name seen on the desktop printer object.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.5. DefaultPrinter ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> DefaultPrinter - List ΓòÉΓòÉΓòÉ
Data Type
String
See Also
CurrentDevice
CurrentPrinter
PrinterDialog
ΓòÉΓòÉΓòÉ <hidden> DefaultPrinter - Description ΓòÉΓòÉΓòÉ
The name of the default system printer. This is the same as the name seen on
the desktop printer object.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.6. FormHeight ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> FormHeight - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
FormName
FormWidth
ΓòÉΓòÉΓòÉ <hidden> FormHeight - Description ΓòÉΓòÉΓòÉ
The height of the currently selected form for the current printer in mm or 1/10
inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.7. FormName ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> FormName - List ΓòÉΓòÉΓòÉ
Data Type
String
See Also
FormHeight
FormWidth
ΓòÉΓòÉΓòÉ <hidden> FormName - Description ΓòÉΓòÉΓòÉ
The name of the currently selected form for the current printer.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.8. FormWidth ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> FormWidth - List ΓòÉΓòÉΓòÉ
Data Type
String
See Also
FormHeight
FormName
ΓòÉΓòÉΓòÉ <hidden> FormWidth - Description ΓòÉΓòÉΓòÉ
The width of the currently selected form for the current printer in mm or 1/10
inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.9. JobName ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> JobName - List ΓòÉΓòÉΓòÉ
Data Type
String
ΓòÉΓòÉΓòÉ <hidden> JobName - Description ΓòÉΓòÉΓòÉ
The document name of the current print job.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.10. LeftMargin ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> LeftMargin - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
BottomMargin
RightMargin
TopMargin
PageHeight
PageWidth
ΓòÉΓòÉΓòÉ <hidden> LeftMargin - Description ΓòÉΓòÉΓòÉ
The distance of the left margin from the left edge of the page. The measure is
in mm or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.11. LineSpace ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> LineSpace - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
PrintCentered
PrintJustified
PrintRight
PrintLeft
PrintLine
ΓòÉΓòÉΓòÉ <hidden> LineSpace - Description ΓòÉΓòÉΓòÉ
Line spacing as a percentage of the font size. The default value is set to
single space = 120%. All writes following this call will use this inter-line
spacing.
ΓòÉΓòÉΓòÉ 2.12. Measures ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Measures - List ΓòÉΓòÉΓòÉ
Data Type
String
Possible Values
Metric
Inch
See Also
DefineTable
SetFooter
SetHeaderMode
SetMargins
ΓòÉΓòÉΓòÉ <hidden> Measures - Description ΓòÉΓòÉΓòÉ
The units to use for distances on the printing page. These can be either mm
(the default) or in 1/10 inch units.
ΓòÉΓòÉΓòÉ 2.13. MinBottomMar ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MinBottomMar - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
MinLeftMar
MinRightMar
MinTopMar
ΓòÉΓòÉΓòÉ <hidden> MinBottomMar - Description ΓòÉΓòÉΓòÉ
The minimum bottom margin allowed for the selected printer. The measure is in
mm or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.14. MinLeftMar ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MinLeftMar - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
MinBottomMar
MinRightMar
MinTopMar
ΓòÉΓòÉΓòÉ <hidden> MinLeftMar - Description ΓòÉΓòÉΓòÉ
The minimum left margin allowed for the selected printer. The measure is in mm
or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.15. MinRightMar ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MinRightMar - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
MinBottomMar
MinLeftMar
MinTopMar
ΓòÉΓòÉΓòÉ <hidden> MinRightMar - Description ΓòÉΓòÉΓòÉ
The minimum right margin allowed for the selected printer. The measure is in mm
or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.16. MinTopMar ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MinTopMar - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
MinBottomMar
MinLeftMar
MinRightMar
ΓòÉΓòÉΓòÉ <hidden> MinTopMar - Description ΓòÉΓòÉΓòÉ
The minimum top margin allowed for the selected printer. The measure is in mm
or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.17. PageHeight ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PageHeight - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
BottomMargin
LeftMargin
RightMargin
TopMargin
PageWidth
ΓòÉΓòÉΓòÉ <hidden> PageHeight - Decsription ΓòÉΓòÉΓòÉ
The height of the printing area of the page (bottom to top margin) in mm or
1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.18. PageNum ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PageNum - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
JobName
ΓòÉΓòÉΓòÉ <hidden> PageNum - Description ΓòÉΓòÉΓòÉ
This property contains the number of the page that is currently being printed.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.19. PageWidth ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PageWidth - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
BottomMargin
LeftMargin
RightMargin
TopMargin
PageHeight
ΓòÉΓòÉΓòÉ <hidden> PageWidth - Description ΓòÉΓòÉΓòÉ
The width of the printing area of the page (left to right margin) in mm or 1/10
inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.20. Printing ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Printing - List ΓòÉΓòÉΓòÉ
Data Type
Boolean
Possible Values
1 (TRUE)
0 (FALSE)
See Also
ClosePrintJob
OpenPrintJob
ΓòÉΓòÉΓòÉ <hidden> Printing - Description ΓòÉΓòÉΓòÉ
This property is set to 1 when a print job is open on the printer object.
Otherwise this property is set to 0.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.21. PrintColor ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintColor - List ΓòÉΓòÉΓòÉ
Data Type
String
Possible Values
See Description
See Also
ColorEnabled
ΓòÉΓòÉΓòÉ <hidden> PrintColor - Description ΓòÉΓòÉΓòÉ
This property is only relevant for colour printers. It contains the current
colour being used for printing. This color can be any of the followng values:
White Black Blue
Red Pink Green
Cyan Yellow DarkGray
DarkBlue DarkRed DarkPink
DarkGreen DarkCyan Brown
PaleGrey <default>
ΓòÉΓòÉΓòÉ 2.22. RightMargin ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> RightMargin - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
BottomMargin
LeftMargin
TopMargin
PageHeight
PageWidth
ΓòÉΓòÉΓòÉ <hidden> RightMargin - Description ΓòÉΓòÉΓòÉ
The distance of the right margin from the right edge of the page. The measure
is in mm or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.23. ShowProgress ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ShowProgress - List ΓòÉΓòÉΓòÉ
Data Type
Boolean
Possible Values
1 (TRUE)
0 (FALSE)
See Also
SetProgressTexts
ΓòÉΓòÉΓòÉ <hidden> ShowProgress - Description ΓòÉΓòÉΓòÉ
This is boolean property that when set enables the progress dialog to pop up
when a job is printing.
Figure: Default Progress Dialog.
ΓòÉΓòÉΓòÉ 2.24. TopMargin ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> TopMargin - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
See Also
BottomMargin
LeftMargin
RightMargin
PageHeight
PageWidth
ΓòÉΓòÉΓòÉ <hidden> TopMargin - Description ΓòÉΓòÉΓòÉ
The distance of the top margin from the upper edge of the page. The measure is
in mm or 1/10 inch depending on the Measures property.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.25. Version ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Version - List ΓòÉΓòÉΓòÉ
Data Type
Numeric
ΓòÉΓòÉΓòÉ <hidden> Version - Description ΓòÉΓòÉΓòÉ
Version number of the object.
Warning: This property is read only and cannot be set with a call to VRSet.
ΓòÉΓòÉΓòÉ 2.26. WordBreak ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> WordBreak - List ΓòÉΓòÉΓòÉ
Data Type
Boolean
Possible Values
1 (TRUE)
0 (FALSE)
ΓòÉΓòÉΓòÉ <hidden> WordBreak - Description ΓòÉΓòÉΓòÉ
The WordBreak property allows you to control the way the VRPrinter Object
performs word wrapping on a block of text. By default this property is set to 1
(TRUE) so that the breaks occur between words. By setting this property off
(0), line wrapping will occur with breaks between characters.
ΓòÉΓòÉΓòÉ 3. VRPrinter events ΓòÉΓòÉΓòÉ
No events are triggred by the VRPrinter Object.
ΓòÉΓòÉΓòÉ 4. VRPrinter methods ΓòÉΓòÉΓòÉ
The following sections describe each of the methods available for the VRPrinter
Object.
AbortPrintJob
BlockFits
ClosePrintJob
DefineTable
EndRow
EndTable
FontDialog
Goto
JobProperties
LineFits
MoveX
MoveY
NewPage
OpenPrintJob
PrintBitMap
PrintBox
PrintCentered
PrinterDialog
PrinterList
PrintFile
PrintJustified
PrintLeft
PrintLine
PrintObjectImage
PrintRight
PrintWinImage
ResetColHeader
ResetHeader
SetFooter
SetHeader
SetHeaderLineFont
SetHeaderMode
SetMargins
SetPrinter
SetProgressTexts
StartCol
StartRow
StartTable
Tab
ΓòÉΓòÉΓòÉ 4.1. AbortPrintJob ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> AbortPrintJob - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
OpenPrintJob
ClosePrintJob
ΓòÉΓòÉΓòÉ <hidden> AbortPrintJob - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "AbortPrintJob");
Aborts the print job and deletes the document from the print queue.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> AbortPrintJob - Parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ <hidden> AbortPrintJob - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Abort the print job */
/********************************************************************/
ok = VRMethod( "PRT_1", "AbortPrintJob");
ΓòÉΓòÉΓòÉ 4.2. BlockFits ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> BlockFits - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
LineFits
PrintCentered
PrintJustified
PrintRight
PrintLeft
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> BlockFits - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "BlockFits",
face_name,
points,
string);
Checks whether the text will fit as one block onto the page or needs a new page
to complete.
Return
TRUE (1) if the block of text will fit on the page else FALSE (0).
Note:
No text is actually printed.
ΓòÉΓòÉΓòÉ <hidden> BlockFits - parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> BlockFits - Example ΓòÉΓòÉΓòÉ
facename = 'Helvetica';
/**** Text is long block of text */
fnt = 8
rcy = VRMethod( "PRT_1", "PrintLine", facename, fnt, text);
rcy = VRMethod( "PRT_1", "PrintLine", , fnt, '');
do fnt = 10 to 24 by 2
if VRMethod( "PRT_1", "BlockFits", facename, fnt, text) then
rcy = VRMethod( "PRT_1", "PrintLine", , fnt, text);
else do
rcy = VRMethod( "PRT_1", "Goto", 0, 10, 1);
rcy = VRMethod( "PRT_1", "PrintRight", , 10, "Continued...");
rcy = VRMethod( "PRT_1", "PrintLine", , fnt, text);
end
if VRMethod( "PRT_1", "BlockFits", facename, fnt, '') then
rcy = VRMethod( "PRT_1", "PrintLine", , fnt, '');
else
rcy = VRMethod( "PRT_1", "PrintRight", , 10, "Continued...");
end
ΓòÉΓòÉΓòÉ 4.3. ClosePrintJob ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ClosePrintJob - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
OpenPrintJob
AbortPrintJob
ΓòÉΓòÉΓòÉ <hidden> ClosePrintJob - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "ClosePrintJob");
Close the print job and end the document.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> ClosePrintJob - parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ <hidden> ClosePrintJob - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Close the print job */
/********************************************************************/
ok = VRMethod( "PRT_1", "ClosePrintJob");
ΓòÉΓòÉΓòÉ 4.4. DefineTable ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> DefineTable - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
StartTable
StartRow
StartCol
EndRow
EndTable
ΓòÉΓòÉΓòÉ <hidden> DefineTable - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "DefineTable",
"table.",
"Cols.");
Defines a table for printing. If there are not the right number of elements in
the stem vars the method will return FALSE.
This call only prepares the internal structures for handling a table, to start
printing the table you must call StartRow and StartCol.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> DefineTable - Parameters ΓòÉΓòÉΓòÉ
"table." Quoted name of a stem variable containing the definition
of the table:
table.0 Must be 9 for monochrome printing or
15 if you use colour support
table.1 fill style for the table (see Fill
Syles)
table.2 line thickness in TWIPS for the
outlines of the cells in the table
table.3 Flag indicating that table has column
headers
table.4 fill style for the table header (see
Fill Syles)
table.5 line thickness in TWIPS for the
outlines of the table headers
table.6 Flag indicating that the table header
should be printed on all pages.
(1 = TRUE, 0 = FALSE)
table.7 Point size of text for column header
texts
table.8 Font face name for column header texts
table.9 Left edge of the table from the left
margin in mm or 1/10 inch depending on
the Measures property
table.10 Colour for the text in the table cells
table.11 Colour for the line around table cells
table.12 Colour for the fill pattern in table
cells
table.13 Colour for the text in the table
headers
table.14 Colour for the line around table
headers
table.15 Colour for the fill pattern in table
headers
"Cols." Quoted name of a complex stem variable containing the
definitions for the columns in the table. it has the form
Cols.x.y
where
x is the column reference starting with 1 y is the field number
Cols.0.0 Number of columns in the table
Cols.x.1 Width of the column in mm or 1/10 inch
depending on the Measures property
Cols.x.2 Column header text
ΓòÉΓòÉΓòÉ <hidden> DefineTable - Example ΓòÉΓòÉΓòÉ
/************************************************************************/
/* Declare a table with no fill style, 0.5 mm separator lines, 1mm */
/* lines around headers on all pages and 3 columns */
/************************************************************************/
table.0 = 15
table.1 = 0
table.2 = 28
table.3 = 1
table.4 = 0
table.5 = 56
table.6 = 1
table.7 = 12
table.8 = 'Helvetica Bold'
table.9 = 10
table.10 = "Red"
table.11 = "Cyan"
table.12 = "Black"
table.13 = "Blue"
table.14 = "White"
table.15 = "Black"
Cols.0.0 = 3
Cols.1.1 = 45
Cols.1.2 = 'Column 1'
Cols.2.1 = 75
Cols.2.2 = 'Column 2'
Cols.3.1 = 40
Cols.3.2 = 'Column 3'
ok = VRMethod( "PRT_1", "DefineTable", "table.", "Cols.");
if ok then do
/**** Start printing in the table **********************************/
ok = VRMethod( "PRT_1", "StartRow");
/**** Start printing in column 1 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 1);
ok = VRMethod( "PRT_1", "PrintRight", 'Helvetica', 10, textvar);
/**** Start printing in column 2 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 2);
ok = VRMethod( "PRT_1", "PrintJustified", 'Helvetica Bold', 10, textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
/**** Start printing in column 3 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 3);
ok = VRMethod( "PRT_1", "PrintCentered", 'Helvetica Bold', 14, textvar);
/**** Print the row ************************************************/
ok = VRMethod( "PRT_1", "EndRow");
/**** Start a new row **********************************************/
ok = VRMethod( "PRT_1", "StartRow");
ok = VRMethod( "PRT_1", "StartCol", 1);
ok = VRMethod( "PRT_1", "PrintRight", 'Times New Roman', 10, textvar);
ok = VRMethod( "PRT_1", "StartCol", 2);
ok = VRMethod( "PRT_1", "PrintLeft", 'Helvetica Bold', 10, textvar);
ok = VRMethod( "PRT_1", "PrintCentered",,,textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
ok = VRMethod( "PRT_1", "PrintRight",,,textvar);
ok = VRMethod( "PRT_1", "StartCol", 3);
ok = VRMethod( "PRT_1", "PrintJustified", 'Times New Roman', 8, textvar);
/**** Print the row ************************************************/
ok = VRMethod( "PRT_1", "EndRow");
/**** Destroy the table data structures ****************************/
ok = VRMethod( object, "EndTable");
end
ΓòÉΓòÉΓòÉ 4.5. EndRow ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> EndRow - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
DefineTable
StartTable
StartRow
StartCol
EndTable
ΓòÉΓòÉΓòÉ <hidden> EndRow - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "EndRow");
End the current row in a table and print it. This will cause the table to wrap
over page if any of the columns will not fit. Cells will be split over the page
not forced onto the next page. If you have defined running headers for the
table, these will be printed at the top of the page.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> EndRow - Parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ 4.6. EndTable ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> EndTable - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
DefineTable
StartTable
StartRow
StartCol
EndRow
ΓòÉΓòÉΓòÉ <hidden> EndTable - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "EndTable");
Terminate table mode printing and return to normal text printing.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> EndTable - Parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ 4.7. FontDialog ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> FontDialog - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrinterDialog
PrinterList
SetPrinter
ΓòÉΓòÉΓòÉ <hidden> FontDialog - Description ΓòÉΓòÉΓòÉ
font = VRMethod( object, "FontDialog",
title,
familyname);
Pops up a dialog with a list of fonts available on your work station for the
selected printer.
Return
Name of the selected font if successful, otherwise an empty string.
Figure: Font Dialog.
ΓòÉΓòÉΓòÉ <hidden> FontDialog - parameters ΓòÉΓòÉΓòÉ
title Title to appear in the font dialog.
familyname This will set the default selected font in the dialog.
This is the name of the font e.g. Helvetica and should not
include the point size or attributes.
ΓòÉΓòÉΓòÉ <hidden> FontDialog - Example ΓòÉΓòÉΓòÉ
fntstr = VRMethod( "PRT_1", "FontDialog", "Choose printer font", "CG Times");
ok = VRSet( "EF_1", "Value", fntstr);
ΓòÉΓòÉΓòÉ 4.8. Goto ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Goto - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
ΓòÉΓòÉΓòÉ <hidden> Goto - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "Goto",
x,
y,
use_points);
Move the GPI cursor to the given position on the page.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> Goto - Parameters ΓòÉΓòÉΓòÉ
x X coordinate in millimetres or 1/10 inch depending on the
Measures property from the left margin, unless use_points
is 1
y Y coordinate in millimetres or 1/10 inch depending on the
Measures property from the bottom margin, unless
use_points is 1
use_points flag indicating whether to use the default Measures or
points.
0 (or parameter absent) = Use default measure
1 = use Points
ΓòÉΓòÉΓòÉ 4.9. JobProperties ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> JobProperties - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
PrinterDialog
PrinterList
SetPrinter
ΓòÉΓòÉΓòÉ <hidden> JobProperties - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "JobProperties");
Pops up the job properties dialog for the printer selected with PrinterDialog
or with SetPrinter. If there is no selected printer, an error dialog is popped
up and the method returns FALSE.
Return
TRUE (1) if successful else FALSE (0).
Figure: Printer Job Properties Dialog for a Laserjet IIIP.
ΓòÉΓòÉΓòÉ <hidden> JobProperties - Parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ 4.10. LineFits ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> LineFits - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
BlockFits
PrintCentered
PrintJustified
PrintRight
PrintLeft
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> LineFits - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "LineFits",
face_name,
points,
string);
Checks whether the text will fit onto the line or needs to be wrapped.
Return
TRUE (1) if the block of text will fit on the line else FALSE (0).
Note:
No text is actually printed.
ΓòÉΓòÉΓòÉ <hidden> LineFits - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ 4.11. MoveX ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MoveX - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
Goto
MoveY
ΓòÉΓòÉΓòÉ <hidden> MoveX - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "MoveX",
relX,
points);
Moves the x position of the graphics printing cursor relX units relative to the
current position. If points is TRUE (1), the cursor is moved relX points,
otherwise the current Measures are used.
Return
TRUE (1) if the cursor was moved else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> MoveX - Parameters ΓòÉΓòÉΓòÉ
relX Number of measurement units to move the cursor. This may
be a negative value, in which case the cursor is moved to
the left.
points Boolean (1 or 0) indicating whether the measures should be
in points (TRUE) or default Measures (FALSE).
ΓòÉΓòÉΓòÉ 4.12. MoveY ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> MoveY - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
Goto
MoveX
ΓòÉΓòÉΓòÉ <hidden> MoveY - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "MoveY",
relY,
points);
Moves the y position of the graphics printing cursor relY units relative to the
current position. If points is TRUE (1), the cursor is moved relY points,
otherwise the current Measures are used.
Return
TRUE (1) if the cursor was moved else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> MoveY - Parameters ΓòÉΓòÉΓòÉ
relY Number of measurement units to move the cursor. This may
be a negative value, in which case the cursor is moved to
the left.
points Boolean (1 or 0) indicating whether the measures should be
in points (TRUE) or default Measures (FALSE).
ΓòÉΓòÉΓòÉ 4.13. NewPage ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> NewPage - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
SetHeader
SetHeaderMode
SetFooter
SetMargins
ΓòÉΓòÉΓòÉ <hidden> NewPage - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "NewPage");
Forces a new page to be printed with its header and footer. If this method is
called inside a table, any headers defined for the table will also be printed.
Warning: This method will not function when called within a table. Tables
handle the wrapping over pages internally.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> NewPage - Parameters ΓòÉΓòÉΓòÉ
Parameters
None
ΓòÉΓòÉΓòÉ 4.14. OpenPrintJob ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> OpenPrintJob - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrinterDialog
SetPrinter
SetMargins
SetHeader
SetHeaderMode
SetFooter
ClosePrintJob
ΓòÉΓòÉΓòÉ <hidden> OpenPrintJob - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "OpenPrintJob",
doc_name,
num_copies);
Opens the print job with the spooler. You should previously define the margins,
header and and footer and, if you do not want to use the default printer, have
selected a printer.
Note: If you have not selected a printer and there is no default printer for
the system, an error dialog is popped up and the method returns FALSE.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> OpenPrintJob - Parameters ΓòÉΓòÉΓòÉ
doc_name The title of the document. This will aslo be passed to the
spooler ad the document name.
num_copies The number of copies to print.
ΓòÉΓòÉΓòÉ <hidden> OpenPrintJob - Example ΓòÉΓòÉΓòÉ
ok = VRMethod( "PRT_1", "SetMargins", 25, 20, 20, 25, 0, 0);
ok = VRMethod( "PRT_1", "SetHeaderMode", header, facename, 10, 8, 28, 0);
ok = VRMethod( "PRT_1", "SetHeader", 3, ,
"$c|", "$lADD Consulting (CH)$r@",,
'Demo for VRPrinter Object for VX-REXX');
ok = VRMethod( "PRT_1", "SetFooter", facename, 8, 0, 14, '$|$rpage $#');
ok = VRMethod( "PRT_1", "OpenPrintJob", 'Document Title');
if \ok then
return
ΓòÉΓòÉΓòÉ 4.15. PrintBitMap ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintBitMap - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintBox
PrintObjectImage
PrintWinImage
ΓòÉΓòÉΓòÉ <hidden> PrintBitMap - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintBitMap",
bitmap_file,
lx, ly,
tx, ty,
th,
border_color);
Prints a bitmap from a file in the box given by the coordinates and framed in
the given line style.
The bit map will be stretched or compressed to fit and, if the printer supports
colour, will be printed in colour.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintBitMap - Parameters ΓòÉΓòÉΓòÉ
bitmap_file Full path to the bitmap file you want to print
lx Lower left X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ly Lower left Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
tx Upper right X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ty Upper right Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
th Thickness of the box line in TWIPS ( 56.7 TWIPS = 1mm)
border_color The colour of the line around the bitmap. One of the
colour strings defined by VX-REXX
ΓòÉΓòÉΓòÉ <hidden> PrintBitMap - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print the OS/2 logo in a box with a thick outline */
/********************************************************************/
/**** Get the path to the bit map ***********************************/
set_path = VALUE( 'PATH', , 'OS2ENVIRONMENT');
bootdrive = substr( set_path, pos( '\OS2\SYSTEM', set_path ) -2, 2);
bmp_name = bootdrive || '\os2\bitmap\os2logo.bmp'
/**** Print the bit map with a blue border **************************/
ok = VRMethod( "PRT_1", "PrintBitMap", bmp_name, 40, 20, 130, 110, 200, "Blue");
ΓòÉΓòÉΓòÉ 4.16. PrintBox ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintBox - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
PrintBitMap
PrintObjectImage
PrintWinImage
ΓòÉΓòÉΓòÉ <hidden> PrintBox - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintBox",
lx, ly,
tx, ty,
th, st,
line_color,
fill_color);
Prints a box at the given coordinates and framed in the given line thickness
and filled with the given style.
Return
TRUE (1) if successful else FALSE (0).
Note: The position of the cursor is unaffected by this method.
ΓòÉΓòÉΓòÉ <hidden> PrintBox - Parameters ΓòÉΓòÉΓòÉ
lx Lower left X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ly Lower left Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
tx Upper right X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ty Upper right Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
th Thickness of the box line in TWIPS ( 56.7 TWIPS = 1mm)
st Style used for filling the box (see Fill Syles)
line_color The colour of the line around the box. One of the colour
strings defined by VX-REXX
fill_color The colour used for the foregound of the fill pattern. One
of the colour strings defined by VX-REXX
ΓòÉΓòÉΓòÉ 4.17. PrintCentered ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintCentered - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintJustified
PrintRight
PrintLeft
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> PrintCentered - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintCentered",
face_name,
points,
string);
Prints the given text in the given font and point size centred between the
declared margins of the page. All the parameters must be present.
The text will be wrapped over several lines if it is too long to fit on one
line and the cursor is placed at the beginning of the next line at the end of
the printing.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintCentered - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> PrintCentered - Examples ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print a text centred on the page (or in a cell) in Helvetica 10 */
/********************************************************************/
ok = VRMethod( "PRT_1", "PrintCentered", "Helvetica", 10, "whatever you want to print");
/**** The following text will have the same font and size ***********/
ok = VRMethod( "PRT_1", "PrintCentered",,,"Here is some more");
ΓòÉΓòÉΓòÉ 4.18. PrinterDialog ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrinterDialog - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
JobProperties
PrinterList
OpenPrintJob
SetPrinter
ΓòÉΓòÉΓòÉ <hidden> PrinterDialog - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrinterDialog",
title,
"Buttons.");
Pops up a dialog with a list of printers available on your work station. You
can set the current printer by either double-clicking on a printer or by
selecting an item and clicking on the OK button.
Initially the default printer will be highlighted.
You can set the properties to use for any of the printers in the list with
Properties button. These properties will be valid until you next call the
Dialog.
Return
Name of the printer that was selected or an empty string if the Cancel button
was pressed.
Warning: If you change the button texts, take care that the text will fit on
the button as the buttons are not resized to the text. ALL BUTTON TEXTS ARE
LIMITED TO 32 CHARACTERS
Figure: Printer Dialog.
ΓòÉΓòÉΓòÉ <hidden> PrinterDialog - Parameters ΓòÉΓòÉΓòÉ
title Title to appear in the printers dialog.
Buttons. Stem variable containing the texts for the buttons in the
dialog.
Buttons.0 Must be 3
Buttons.1 New text for the OK button in the
dialog.
Buttons.2 New text for the Job properties...
button in the dialog.
Buttons.3 New text for the Cancel button in the
dialog.
ΓòÉΓòÉΓòÉ 4.19. PrinterList ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrinterList - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrinterDialog
SetPrinter
ΓòÉΓòÉΓòÉ <hidden> PrinterList - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrinterList",
"printers.");
This method returns a list of printer names that you can use to create your own
printer selection dialog. You can set the selected printer with a call to
SetPrinter using the index of the printer name.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrinterList - Parameters ΓòÉΓòÉΓòÉ
"printers." Quoted name of a stem variable to contain the list of
available printers.
printers.0 will contain the number of printers in the
list.
ΓòÉΓòÉΓòÉ <hidden> PrinterList - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Get the list of printers into a stem variable */
/****************************************************************/
ok = VRMethod( "PRT_1", "PrinterList", "printers.");
ΓòÉΓòÉΓòÉ 4.20. PrintFile ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintFile - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
OpenPrintJob
ClosePrintJob
PrintBitMap
ΓòÉΓòÉΓòÉ <hidden> PrintFile - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintFile",
face_name,
points,
style,
file_name);
Prints the given file in the given font, point size and style. All the
parameters must be present.
A print job must have been opened prior to calling this method.
Return
TRUE (1) if successful else FALSE (0).
Warning: Only print plain text files with this method. printing any other kind
of file could produce unexpected results.
ΓòÉΓòÉΓòÉ <hidden> PrintFile - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
style The style to print in:
"L" or empty = Left aligned
"R" = Right aligned "C" = Centred "J" = Justified
file_name fully qualified name of the file to print.
ΓòÉΓòÉΓòÉ 4.21. PrintJustified ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintJustified - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintCentered
PrintRight
PrintLeft
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> PrintJustified - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintJustified",
face_name,
points,
string);
Prints the given text in the given font and point size justified between the
declared margins of the page. All the parameters must be present.
The text will be wrapped over several lines if it is too long to fit on one
line and the cursor is placed at the beginning of the next line at the end of
the printing.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintJustified - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> PrintJustified - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print a text justified on the page (or in a cell) in Helv 10 */
/********************************************************************/
ok = VRMethod( "PRT_1", "PrintJustified", "Helvetica", 10, "whatever you want to print");
/**** The following text will have the same font and size ***********/
ok = VRMethod( "PRT_1", "PrintJustified",,,"Here is some more");
ΓòÉΓòÉΓòÉ 4.22. PrintLeft ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintLeft - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintCentered
PrintJustified
PrintRight
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> PrintLeft - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintLeft",
face_name,
points,
string);
Prints the given text in the given font and point size. All the parameters must
be present.
The text will be wrapped over several lines if it is too long to fit on one
line and the cursor is placed at the end of the text at the end of the
printing.
Return
TRUE (1) if successful else FALSE (0).
Note:
Remember to add a space at the end of a string if you call this method several
times, otherwise the texts will be "stuck" together.
ΓòÉΓòÉΓòÉ <hidden> PrintLeft - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> PrintLeft - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print a text on the page (or in a cell) in Helvetica 10 */
/********************************************************************/
ok = VRMethod( "PRT_1", "PrintLeft", 'Helvetica', 10, 'whatever you want to print. ');
/**** The following text will have the same font and size ***********/
ok = VRMethod( "PRT_1", "PrintLeft",,,'Here is some more');
ΓòÉΓòÉΓòÉ 4.23. PrintLine ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintLine - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintCentered
PrintJustified
PrintRight
PrintLeft
FontDialog
ΓòÉΓòÉΓòÉ <hidden> PrintLine - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintLine",
face_name,
points,
string);
Prints the given text in the given font and point size aligned on the left
margin of the page. All the parameters must be present.
The text will be wrapped over several lines if it is too long to fit on one
line and the cursor is placed at the beginning of the next line at the end of
the printing.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintLine - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> PrintLine - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print a text on the page (or in a cell) in Helvetica 10 */
/********************************************************************/
ok = VRMethod( "PRT_1", "PrintLine", 'Helvetica', 10, 'whatever you want to print');
/**** The following text will have the same font and size ***********/
ok = VRMethod( "PRT_1", "PrintLine",,,'Here is some more');
ΓòÉΓòÉΓòÉ 4.24. PrintObjectImage ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintObjectImage - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
PrintBitMap
PrintBox
PrintWinImage
ΓòÉΓòÉΓòÉ <hidden> PrintObjectImage - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( prt, "PrintObjectImage",
object,
lx, ly,
tx, ty,
th,
border_color);
Prints an image of the object. If you pass the name of a window the client area
will be printed without any frame controls.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintObjectImage - Parameters ΓòÉΓòÉΓòÉ
object Name of the VX-REXX visible object to print e.g. "Window1"
lx Lower left X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ly Lower left Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
tx Upper right X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property. if this parameter is left out the image will be
printed with the same width as the object on the screen.
ty Upper right Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property. if this parameter is left out the image will be
printed with the same height as the object on the screen.
th Thickness of the box line in TWIPS ( 56.7 TWIPS = 1mm)
border_color The colour of the line around the image. One of the colour
strings defined by VX-REXX
ΓòÉΓòÉΓòÉ 4.25. PrintRight ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintRight - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
PrintCentered
PrintJustified
PrintLeft
PrintLine
FontDialog
ΓòÉΓòÉΓòÉ <hidden> PrintRight - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "PrintRight",
face_name,
points,
string);
Prints the given text in the given font and point size right justified with
relation to the right margin of the page. All the parameters must be present.
The text will be wrapped over several lines if it is too long to fit on one
line and the cursor is placed at the beginning of the next line at the end of
the printing.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintRight - Parameters ΓòÉΓòÉΓòÉ
face_name Name of the font used to print. This MUST be an outline
font. If this is left empty, the previous font is used.
points Point size of the font, If this is left empty, the
previous font size is used.
string The string to be printed.
ΓòÉΓòÉΓòÉ <hidden> PrintRight - Example ΓòÉΓòÉΓòÉ
/********************************************************************/
/* Print a text right aligned on the page (or in a cell) */
/********************************************************************/
ok = VRMethod( "PRT_1", "PrintRight", 'Helvetica', 10, 'whatever you want to print');
/**** The following text will have the same font and size ***********/
ok = VRMethod( "PRT_1", "PrintRight",,,'Here is some more');
ΓòÉΓòÉΓòÉ 4.26. PrintWinImage ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> PrintWinImage - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
PrintBitMap
PrintBox
PrintObjectImage
ΓòÉΓòÉΓòÉ <hidden> PrintWinImage - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( prt, "PrintWinImage",
hwnd,
lx, ly,
tx, ty,
th,
border_color);
Prints an image of the contents of a window.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> PrintWinImage - Parameters ΓòÉΓòÉΓòÉ
hwnd Handle of the window whose contents you want to print.
This should be in the form ?HWNDxxxxx as returned by
VX-REXX "screen" methods etc..
lx Lower left X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property
ly Lower left Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property
tx Upper right X coordinate taken from the left margin in
millimetres or 1/10 inch depending on the Measures
property. if this parameter is left out the image will be
printed with the same width as the object on the screen.
ty Upper right Y coordinate taken from the bottom margin in
millimetres or 1/10 inch depending on the Measures
property. if this parameter is left out the image will be
printed with the same height as the object on the screen.
th Thickness of the box line in TWIPS ( 56.7 TWIPS = 1mm)
border_color The colour of the line around the image. One of the colour
strings defined by VX-REXX
ΓòÉΓòÉΓòÉ 4.27. ResetColHeader ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ResetColHeader - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
DefineTable
ΓòÉΓòÉΓòÉ <hidden> ResetColHeader - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "ResetColHeader",
col_num,
text);
Changes the text in the table header for the given column.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> ResetColHeader - Parameters ΓòÉΓòÉΓòÉ
col_num Number of the column (1..n) whose header text you want to
change
text New header text for the column
ΓòÉΓòÉΓòÉ 4.28. ResetHeader ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ResetHeader - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
SetHeader
SetHeaderMode
SetHeaderLineFont
SetFooter
ΓòÉΓòÉΓòÉ <hidden> ResetHeader - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "ResetHeader",
numlines,
text
[, text]);
Redefines the text lines for the header printed on each page of document. The
text variable can contain Formatting Flags.
If you declare less lines than were originally defined for the header, the
extra lines will be destroyed and cannot be re-used.
Return
TRUE (1) if successful else FALSE (0).
Warning: You should only call this method after opening a print job to modify
the header for the following pages
ΓòÉΓòÉΓòÉ <hidden> ResetHeader - Parameters ΓòÉΓòÉΓòÉ
numlines The number of lines in the header ( 1 to 5)
text The text to printed on the line. there should be numlines
text variables. An empty variable will leave the original
header text for that line.
ΓòÉΓòÉΓòÉ 4.29. SetFooter ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetFooter - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
SetHeader
SetHeaderMode
FontDialog
ΓòÉΓòÉΓòÉ <hidden> SetFooter - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetFooter",
facename,
points,
fill,
line,
text,
line_color,
fill_color,
text_color);
Defines the footer printed on each page of document. The text variable can
contain Formatting Flags. If you don't define any colours, the default colour
will be used.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> SetFooter - Parameters ΓòÉΓòÉΓòÉ
facename name of the font used in printing the footer text
points Point size for the font
fill Fill style for the footer area (see Fill Syles)
line Line thickness for a box surrounding the footer
text Text to be printed in the footer
line_color The colour of the line around the header. One of the
colour strings defined by VX-REXX
fill_color The colour used for the foregound of the fill pattern. One
of the colour strings defined by VX-REXX
text_color The colour for printing the text. One of the colour
strings defined by VX-REXX
ΓòÉΓòÉΓòÉ <hidden> SetFooter - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Set the footer with the page number right justified and the */
/* document title left aligned with an unfilled blue box around */
/* it and with black text. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetFooter", 'Helvetica', 8, 0, 14, '$|$rpage $#', "Blue", , "Black");
ΓòÉΓòÉΓòÉ 4.30. SetHeader ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetHeader - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
SetHeaderMode
ResetHeader
SetHeaderLineFont
SetFooter
ΓòÉΓòÉΓòÉ <hidden> SetHeader - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetHeader",
numlines,
text
[, text]);
Defines the text lines for the header printed on each page of document. The
text variable can contain Formatting Flags.
Return
TRUE (1) if successful else FALSE (0). FALSE is also returned if there has been
no previous call to SetHeaderMode.
Warning: You MUST make a call to the SetHeaderMode method before calling this
method
ΓòÉΓòÉΓòÉ <hidden> SetHeader - Parameters ΓòÉΓòÉΓòÉ
numlines The number of lines in the header ( 1 to 5)
text The text to printed on the line. there should be numlines
text variables
ΓòÉΓòÉΓòÉ <hidden> SetHeader - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Set the header with the doc title on the first line centred, */
/* the date on the second line right justified and some other */
/* text. There are 3 lines in the header. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeader", 3, ,
"$c|",,
"$lADD Consulting (CH)$r@",,
'Demo for VRPrinter Object for VX-REXX');
ΓòÉΓòÉΓòÉ 4.31. SetHeaderLineFont ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetHeaderLineFont - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
SetHeaderMode
SetHeader
ΓòÉΓòÉΓòÉ <hidden> SetHeaderLineFont - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetHeaderLineFont",
linenum,
font,
points);
Sets the font for one line in the header to a different size or font from that
defined in SetHeaderMode.
Return
TRUE (1) if successful else FALSE (0). FALSE is also returned if there has been
no previous call to SetHeaderMode and SetHeader.
Warning: You MUST make a call to the SetHeaderMode and SetHeader methods before
calling this method
ΓòÉΓòÉΓòÉ <hidden> SetHeaderLineFont - Parameters ΓòÉΓòÉΓòÉ
linenum The line number in the header whose font is to be set
font The font to use for printing the line
points The point size to be used for printing
ΓòÉΓòÉΓòÉ <hidden> SetHeaderLineFont - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Print the header on all the pages with default 10 pt */
/* Helvetica bold, a .05mm line around and halftone fill. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeaderMode", 1, 'Helvetica Bold', 10, 8, 28, 1);
/****************************************************************/
/* Set the header with the doc title on the first line centred, */
/* the date on the second line right justified and some other */
/* text. There are 3 lines in the header. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeader", 3, ,
"$c|",,
"$lADD Consulting (CH)$r@",,
'Demo for VRPrinter Object for VX-REXX');
/****************************************************************/
/* Change the point size for the first line. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeaderLineFont", 1, , 12);
/****************************************************************/
/* Change the font and point size for the third line. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeaderLineFont", 3, "Helvetica", 8);
ΓòÉΓòÉΓòÉ 4.32. SetHeaderMode ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetHeaderMode - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
SetFooter
SetHeader
SetHeaderLineFont
FontDialog
ΓòÉΓòÉΓòÉ <hidden> SetHeaderMode - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetHeaderMode",
print,
facename,
points,
fill,
line,
all_pages,
line_color,
fill_color,
text_color);
Define the way the header is printed. Unless you specify different fonts for
each line with SetHeaderLineFont, the text will be printed in the font and
point size defined with this method. If you don't define any colours, the
default colour will be used.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> SetHeaderMode - Parameters ΓòÉΓòÉΓòÉ
print 0 = Never print the header
1 = print the header
facename name of the default font used in printing the header text.
points Default point size for printing the header.
fill Fill style for the header area (see Fill Syles)
line Line thickness for a box surrounding the header
all_pages 0 = print header on first page only
1 = print header on all the pages
line_color The colour of the line around the header. One of the
colour strings defined by VX-REXX
fill_color The colour used for the foregound of the fill pattern. One
of the colour strings defined by VX-REXX
text_color The colour for printing the text. One of the colour
strings defined by VX-REXX
ΓòÉΓòÉΓòÉ <hidden> SetHeaderMode - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Print the header on all the pages in 10 pt Helvetica bold */
/* with a .05mm blue line around and filled with cyan halftone. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetHeaderMode", 1, 'Helvetica Bold', 10, 8, 28, 1, "Blue", "Cyan");
ΓòÉΓòÉΓòÉ 4.33. SetMargins ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetMargins - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
SetFooter
SetHeader
SetHeaderMode
ΓòÉΓòÉΓòÉ <hidden> SetMargins - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetMargins",
lm, rm,
tm, bm,
pb, ps,
line_color,
fill_color);
Defines the printing margins for the job and whether the printing area has a
border and a fill style. If you don't define any colours, the default colour
will be used.
The border, if defined, will be printed just outside the margins.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> SetMargins - Parameters ΓòÉΓòÉΓòÉ
lm Left margin in millimetres or 1/10 inch depending on the
Measures property from page edge
rm Right margin in millimetres or 1/10 inch depending on the
Measures property from page edge
tm Top margin in millimeteres from page edge
bm Bottom margin in millimetres or 1/10 inch depending on the
Measures property from page edge
pb Thickness of line making a border around the page
ps Fill style for the page (see Fill Syles)
line_color The colour of the line around the header. One of the
colour strings defined by VX-REXX
fill_color The colour used for the foregound of the fill pattern. One
of the colour strings defined by VX-REXX
ΓòÉΓòÉΓòÉ <hidden> SetMargins - Example ΓòÉΓòÉΓòÉ
/****************************************************************/
/* Set the margins to left 25mm right 20mm top 20mm bottom 25mm */
/* and set the page to filled with green halftone with a black */
/* 1mm border. */
/****************************************************************/
ok = VRMethod( "PRT_1", "SetMargins", 25, 20, 20, 25, 56, 8, "Black", "Green");
ΓòÉΓòÉΓòÉ 4.34. SetPrinter ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetPrinter - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
PrinterList
OpenPrintJob
ΓòÉΓòÉΓòÉ <hidden> SetPrinter - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetPrinter",
idx);
For programs that do not use PrinterDialog, the printer MUST be set using this
method if you do not want to use the default printer. The index refers to the
position of the chosen printer name in the the stem variable returned by
PrinterList and is 1 based.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> SetPrinter - Parameters ΓòÉΓòÉΓòÉ
idx Index of the printer in the list returned by PrinterList
If this variable is missing or set to 0, the default
printer will be selected.
ΓòÉΓòÉΓòÉ 4.35. SetProgressTexts ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> SetProgressTexts - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
ShowProgress
ΓòÉΓòÉΓòÉ <hidden> SetProgressTexts - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "SetProgressTexts",
"texts.");
This method allows to customise the Progress dialog. Any of the input stem
parameter fields may be left blank, in which case they assume the defaut
values.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> SetProgressTexts - Parameters ΓòÉΓòÉΓòÉ
texts. Stem variable containing the new title and texts for the
progress dialog.
texts.0 Must be 5
texts.1 New text for the title of the dialog.
By default this is: "Printing -
Progress".
texts.2 New text for the 1st line in the
dialog. By default this is the
document name.
texts.3 New text for the 2nd line in the
dialog. by default this test is:
"Printing page %u". If you replace
this text, you must include the %u
flag for the page number that is
printing.
texts.4 New text for the 3rd line in the
dialog. By default this is the name of
the printer where he job is printing.
texts.5 New text for the Abort button in the
dialog.
ΓòÉΓòÉΓòÉ 4.36. StartCol ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> StartCol - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
DefineTable
StartTable
StartRow
ΓòÉΓòÉΓòÉ <hidden> StartCol - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "StartCol",
column);
Instructs the program to direct all text printing calls to print within the
borders set for the column.
Columns are numbers start at 1.
Return
TRUE (1) if successful else FALSE (0).
Note:
A Table must have been previously declared.
ΓòÉΓòÉΓòÉ <hidden> StartCol - Parameters ΓòÉΓòÉΓòÉ
column Number of the column to start printing.
ΓòÉΓòÉΓòÉ 4.37. StartRow ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> StartRow - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
See Also
DefineTable
StartTable
StartCol
EndRow
ΓòÉΓòÉΓòÉ <hidden> StartRow - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "StartRow");
Instructs the program that a new row in a table is to be started. All printing
commands following this call will be directed into the last column that was
declared. You MUST follow this call by a call to StartCol otherwise you may
generate an Access Violation.
Return
TRUE (1) if successful else FALSE (0).
Note:
A table must have been previously declared.
ΓòÉΓòÉΓòÉ <hidden> StartRow - Parameters ΓòÉΓòÉΓòÉ
None
ΓòÉΓòÉΓòÉ 4.38. StartTable ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> StartTable - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
Example
See Also
DefineTable
StartRow
StartCol
EndRow
EndTable
ResetColHeader
ΓòÉΓòÉΓòÉ <hidden> StartTable - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "StartTable",
fill,
line,
numcols,
lm,
width
[, width]);
Defines a table for printing. If there are not the right number of lm, rm pairs
the method will return FALSE.
This call only prepares the internal structures for handling a table, to start
printing the table you must call StartRow and StartCol.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> StartTable - Parameters ΓòÉΓòÉΓòÉ
fill Fill style used for the table. This applies to all the
cells.
line Thickness of the separator lines for the table in TWIPS
numcols The number of columns in the table; There MUST be a width
variable for each column
lm Left edge of the table in millimetres or 1/10 inch
depending on the Measures property from the left margin
width Width of the column in millimetres or 1/10 inch depending
on the Measures property. There must be numcols width
variables
ΓòÉΓòÉΓòÉ <hidden> StartTable - Example ΓòÉΓòÉΓòÉ
/************************************************************************/
/* Declare a table with no fill style, 0.5 mm separator lines and */
/* 3 columns */
/************************************************************************/
ok = VRMethod( "PRT_1", "StartTable", 0, 24, 3,,
30,45,,
75,50,,
125,40);
if rcy then do
/**** Start printing in the table **********************************/
ok = VRMethod( "PRT_1", "StartRow");
/**** Start printing in column 2 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 1);
ok = VRMethod( "PRT_1", "PrintRight", 'Helvetica', 10, textvar);
/**** Start printing in column 2 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 2);
ok = VRMethod( "PRT_1", "PrintJustified", 'Helvetica Bold', 10, textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
/**** Start printing in column 3 ***********************************/
ok = VRMethod( "PRT_1", "StartCol", 3);
ok = VRMethod( "PRT_1", "PrintCentered", 'Helvetica Bold', 14, textvar);
/**** Print the row ************************************************/
ok = VRMethod( "PRT_1", "EndRow");
/**** Start a new row **********************************************/
ok = VRMethod( "PRT_1", "StartRow");
ok = VRMethod( "PRT_1", "StartCol", 1);
ok = VRMethod( "PRT_1", "PrintRight", 'Times New Roman', 10, textvar);
ok = VRMethod( "PRT_1", "StartCol", 2);
ok = VRMethod( "PRT_1", "PrintLeft", 'Helvetica Bold', 10, textvar);
ok = VRMethod( "PRT_1", "PrintCentered",,,textvar);
ok = VRMethod( "PRT_1", "PrintJustified",,,textvar);
ok = VRMethod( "PRT_1", "PrintRight",,,textvar);
ok = VRMethod( "PRT_1", "StartCol", 3);
ok = VRMethod( "PRT_1", "PrintJustified", 'Times New Roman', 8, textvar);
/**** Print the row ************************************************/
ok = VRMethod( "PRT_1", "EndRow");
/**** Destroy the table data structures ****************************/
ok = VRMethod( object, "EndTable");
end
ΓòÉΓòÉΓòÉ 4.39. Tab ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Tab - List ΓòÉΓòÉΓòÉ
Topics
Description
Parameters
ΓòÉΓòÉΓòÉ <hidden> Tab - Description ΓòÉΓòÉΓòÉ
ok = VRMethod( object, "Tab");
Move to the next tab position on the line. Tabs are set when a print job is
opened and are placed every 10 millimetres or 1/2 inch depending on the
Measures property starting at the left margin.
Return
TRUE (1) if successful else FALSE (0).
ΓòÉΓòÉΓòÉ <hidden> Tab - Parameters ΓòÉΓòÉΓòÉ
None