Description
The Set_Printer function provides intelligent defaults for the parameters that are unassigned. The format of the parameters that are passed to the Set_Printer function are consistent with standard OI parameters.
Syntax
stat = Set_Printer (MSG, PARM1, PARM2, ...)
Parameters
The first parameter (MSG) for Set_Printer is the message or function that is sent to the printer, and it is required. The remaining parameters are optional parameters that are sent to the printer engine and control the behavior of the message. All of the parameters can be passed as strings.
Returns
A value of "1" is returned by Set_Printer if the function call was successful. A negative value is returned by Set_Printer if ERRORS occurred.
See also
Get_Printer(), Set_Printer error codes
Example
Message | Description |
---|---|
ADDTABLE | The ADDTABLE message is used to print tabular data. |
ARCHIVEDELETE | The ARCHIVEDELETE Message deletes a specific report in the archive file. |
BMP | The BMP message will print an image at a specific location on the page. |
CALCBMP | The CALCBMP message is used to calculate the width and height of an image prior to printing. |
CALCMAXLEN | The CALCMAXLEN message is used to calculate the maximum number of characters that will fit within a specified size. |
CALCTABLE | The CALCTABLE message is used to calculate the width and height of a table before printing it. |
CALCTEXT | The CALCTEXT message is used to calculate the width and height of a text string. The current font information, line spacing, and page size is used to calculate the height and width of the text. |
COLLATE | The COLLATE message is used to set the collate property for the current report. Always check the return code from the COLLATE message for errors, because not all printers support this feature. |
CONTROL | The CONTROL message is used to set miscellaneous properties for printing. |
COPIES | The COPIES message is used to set the number of copies to be printed. Always check the return code from the COPIES message for errors, because not all printers support this feature. |
DRAWCIRCLE | The DRAWCIRCLE message is used to print to a circle at a specific location on the page using the previously set Line and Fill styles. |
DUPLEX | The DUPLEX message is used to set the duplex mode for the current printer. The Duplex is a value that is specified in the OIPRINT_EQUATES. Always check the return code from the DUPLEX message for errors, because not all printers support duplex printing. |
ELLIPSE | The ELLIPSE message is used to print an ellipse at a specific location on the page using the current line and fill styles. |
ENABLERTF | The ENABLERTF message is used to enable printing RTF codes in text, tables, headers, and footers. |
ENDOVERLAY | Used in conjunction with STARTOVERLAY to print to prior pages after the report has been created. |
ENDTABLE | The ENDTABLE message is used in conjunction with the ADDTABLE and TABLECELL messages. If formatting is to be done upon a table then the ENDTABLE message must be sent after the ADDTABLE. |
EXPORTDATA | The EXPORTDATA message is used to insert raw data into the RTF or HTML export. |
FILLSTYLE | The FILLSTYLE message is used to change the brush style and color for the RECT, POLYGON, and ELLIPSE messages. See the OIPRINT_EQUATES in the SYSPROCS table for more information on fill styles. |
FONT | The FONT message sets the font that is used for printing the main body of text. This is the font that is used by the ADDTABLE, TABLE, TEXT, TEXTBOX, TEXTCOL, and TEXTXY messages. |
FONTHEADFOOT | The FONTHEADFOOT message sets the font that is used by the headers and footers. |
FOOTER | The FOOTER message is used to set the page footers. |
HEADER | The HEADER message is used to set the page headers. |
INDENT | The INDENT message is used to set the indents for the current printer. |
INIT | The INIT message must be called before any printing can start. The INIT message controls the initial properties for each printing session. Every INIT message must have a matching TERM message. |
LINE | The LINE message is used to print a line at a specific location on the page using the current line style. |
LINESTYLE | The LINESTYLE message is used to change the style, thickness, and color of the lines that are used by the RECT, POLYGON, POLYLINE, LINE, and ELLIPSE messages. |
LOADDOC | The LOADDOC message is used to load a previously created report that was saved with the INIT message or to retrieve an archived report. |
MARGIN | The MARGIN message is used to change the margins in the middle of a report. |
MOVEPAGES | The MOVEPAGES message is used to move a page or range of pages to the front of a report. |
ORIENTATION | The ORIENTATION message is used to change the orientation in the middle of a report. |
PAGEBREAK | The PAGEBREAK message is used to force a page break. |
PAGESIZE | The PAGESIZE message is used to change the width and height of the page. |
PAPERBIN | The PAPERBIN message is used to set the current Paper Bin. The PaperBin is an integer that is specified in the OIPRINT_EQUATES. |
POLYGON | The POLYGON message is used to print closed polygons using the current line style and fill style. The line and fill styles are set with the LINESTYLE and FILLSTYLE messages. |
POLYLINE | The POLYLINE message is used to print connected lines with the current line style. The line style is set with the LINESTYLE message. |
POS | The POS message is used to set the current printing position for the TEXT, TEXTCOL, ADDTABLE, and TABLE Set_Printer() messages. |
PREVIEWMODE | The PREVIEWMODE message is used to set the print preview mode. |
PRINTQUALITY | The PRINTQUALITY message is used to set the print quality mode |
RECT | The RECT message is used to print a rectangle at a specific location on the page using the current line style and fill style. The line and fill styles are set with the LINESTYLE and FILLSTYLE messages. |
RESETPAGE | The RESETPAGE message is used to reset the page number to 1 when using 'P' in the header option. |
START32 | The START32 message must be called once to enable the 32-bit features of the OIPI. This message must be called before the INIT message. |
STARTOVERLAY | The STARTOVERLAY message is used to print to a page that has been created after the report has been completed. This is only valid in the preview mode. Any printing will be added to what has all ready been created on the given page. You may use as many overlays as necessary. |
STARTTABLE | The STARTTABLE message is used in conjunction with the ADDTABLE and TABLECELL messages. If formatting is to be done upon a table then the STARTTABLE message must be sent prior to the ADDTABLE message. |
STOP32 | The STOP32 message is used to end the 32-bit printing engine. All reports printed after the STOP32 message will use the Standard OIPI. |
TABLE | The TABLE message is used to insert a table. There are two main differences between using the TABLE message and the TEXTCOL message. |
TABLECELL | The TABLECELL message returns or sets properties of a table cell or range. |
TERM | The TERM message is used to end a printing session. |
TEXT | The TEXT message is used to send standard text to the printer. |
TEXTBOX | The TEXTBOX message is used to send output to the printer at a specific position with the text contained a rectangular region. |
TEXTCOL | The TEXTCOL message is used to send columnar text to the printer. |
TEXTRTF | The TEXTRTF message is used to send Rich Text Format (RTF) text to the printer. |
TEXTXY | The TEXTXY message is used to send output to the printer at a specific position. |
TRUETYPE | The TRUETYPE message is used to set the TrueType mode. |