Places text in the document to be printed.
Visual Basic |
---|
Public Sub PrintText( _ ByVal prntStr As String _ ) |
- prntStr
- A string expression to print.
The text is placed at the CurrentX and CurrentY position.
After PrintText executes, CurrentX and CurrentY are updated as follows:
- If the AddCR property is True, CurrentY is set to the next line position, and CurrentX is set to the LMargin property value.
- If the AddCR property is False, CurrentX is set to the next text position and CurrentY remains unchanged. The PrintText method prints embedded carriage returns.
- If the text does not fit on a line, it does not word-wrap to the next line. If you want to word-wrap text, use the PrintTextAligned method.
- If the text you want to print doesn't fit on the current page, a new page is automatically generated.
- If a printer has not been selected or a document has not been started, the PrintText method will select the default printer and start a new document.
Note: If the output of a Graphics method (e.g. line, circle, etc.) doesn't fit on the page, a new page is not generated. The output is clipped to fit the page's printable area.