CDS354
Print 2 column PCL Box |
Last Revised: 04/12/15 |
This called routine can be used with PCL 5 compatible devices such as most laser or ink-jet printers, to print a PCL box with two columns and one or more rows. The left column is typically used for the field title and is shaded. The right column is typically used for the field data.
CDS354 requires the printer to have an internal, scalable, Univers typeface. This has traditionally been available on most laser printers and copiers. However Hewlett Packard has removed this internal typeface on many printers that support PCL 6, such as the LaserJet 2015 and the Color Laser All-in-One 2840. Print the printer's PCL font list to insure compatibility.
CDS354 is called once for each row in the box, then one more time indicating that there will be no more rows.
Data Row
CALL "CDS354", COL1$, COL2$,
LRC$
Note: You may call with less than the complete ENTER list to assume default values.
See Also:
CDS254 - Print PCL Text, Line, Box and Overlay
CDS454 - Print PCL Grid
CDS554 - Advanced PCL Grid
The text will be automatically reduced in size to fit in the cell should the column width be too small at the default font size.
End of Data
Use CDS041 to obtain template for S345$ early in the program:
CALL "CDS041","CDS354",S354$,"YY"
Clear template's previous values, then populate and call:
S354.COL=10,S354.ROW=100
CALL "CDS354::DONE",Y6$,S354$
End of Data Call | |||||||
---|---|---|---|---|---|---|---|
Y6$
|
Printer control variable set by CDS084 and used by CDS354 to determine printer channel, etc. | ||||||
S354.COL
|
Dot column for upper left or upper right corner of box. A positive value indicates the position of the upper left corner. A negative value indicates the position of the upper right corner. This is useful when you want the box flush with the right side of the page. There are 300 dot columns per inch. With standard 8.5" wide paper in portrait orientation, the dot columns range from 0 to 2399 with a 1/4 inch margin on either side. | ||||||
S354.ROW
|
Dot row for upper left corner of box. There are 300 dot rows per inch. With standard 11" long paper in portrait orientation, the dot rows range from 0 to 3299 with a 1/4 inch margin on top and bottom. | ||||||
BOXCOLS
|
Optional. Width of overall box in dot columns.
|
||||||
MARGIN
|
Optional parameter used to control the top & bottom margin in dots in the cell. The default value is 10, which makes a row with one line of text 50 + 10 = 60 dots high, with two lines of text 50 + 50 + 10 = 110 dots high. The smallest value is 1 which means a row would be 51 dots high. You may pass MARGIN values of 1 to 255. Note the default margin was changed on April 25, 2012 from 25 to 10 in order to duplicate the row height used in CDS454. Check the date of CDS354 to determine your default margin. | ||||||
LCOLWIDTH
|
Optional parameter indicating the width of the left column in dots.
|
||||||
R COLWIDTH
|
Optional parameter indicating the width of the right column in dots.
|
||||||
LCOLSHADE
|
Optional parameter indicating the shading for the left column.
|
||||||
RCOLSHADE
|
Optional parameter indicating the shading for the right column.
|
||||||
COLEND
|
Set by CDS354 to the rightmost dot column used by the box. Useful when it is necessary to know where data can be printed to the right of the box. | ||||||
ROWEND
|
Set by CDS354 to the dot row for the bottom of the box. This can be used by the calling application for printing other data below this box. |
CDS354 uses a temporary global variable SMS_CDS354 to store the text to be printed, and is cleared upon the final call.
Simple Example |
0110 CALL "CDS084",Y$,Y5$,U0,S084$,Y6,Y6$
|
Output of example illustrating cells with multiple lines of text and color |