PrintPRO 8 for ActiveX - User Guide > How To > Print > Print without ImagXpress |
To print a document, use the following steps:
Select a printer. PrintPRO™ automatically selects the system default printer but you can select any printer connected to your system. If you want to use the default printer, you can skip to step 2.
Set the printer properties. Printer properties include the paper size, print quality, orientation, etc. If you want to use the printers default properties, you can skip to step 3.
Use the DocName property to set the document name. When the system spools your document for printing, the document name appears in the list of documents to be printed. The default document name is PrintPRO Document. If you want to use the default document name, skip to step 4.
Start a document. You can use the StartPrintDoc method to start a document, however, PrintPRO's text, graphics and bitmap methods (e.g. PrintText) will automatically start a document if one has not been started.
Print text, graphics and bitmaps on the document page. The NewPage method lets you start a new page and the Page property returns the current page number.
Print the document. Use the EndPrintDoc method to send the document to the print spooler.
If you want to stop printing the current document, before you start a new document, use the KillPrintDoc method.
Example |
Copy Code
|
---|---|
' Define variables Dim a As Integer Dim b As Integer ' define the image and scale mode PrintPRO1.Picture = LoadPicture ("\MyDocuments\mypicture.bmp") PrintPRO1.ScaleMode = SCALE_Pixel ' start the print PrintPRO1.StartPrintDoc ' set the margins a = PrintPRO1.ScaleWidth - PrintPRO1.LMargin b = PrintPRO1.ScaleHeight - PrintPRO1.TMargin - PrintPRO1.BMargin PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True ' end the print document PrintPRO1.EndPrintDoc |