A print job provides instructions to the printer about what to print. To construct a print job,
- Define a PrintJob object. A name for the print job can be specified as a parameter of the PrintJob constructor.
- Set margins that will be used to define placement of the page within the printable area, by setting BottomMargin, TopMargin, LeftMargin, and UseHardwareMargins.
- Create the pages in the print job. Call the NewPage method to define a new page in the print job. Then, populate the page using a TemplateFileName, or by adding bitmaps (PrintBitmap), DIBs (PrintDib), and images (PrintImage), and graphics. When the page has been populated, call NewPage to start another page in the print job, and repeat until the entire print job has been defined.
- Once the print job has been created, call Finish to release the job to the print device or spooler.
|
The Kill method can be called at any time during the life of a print job, prior to calling Finish. Calling Kill immediately terminates the current print job. |
Populating a Page Using a Template File
A collage template file is a text file, formatted to describe the image sizes and locations to be placed on the page. To use a template file in a print job, specify the TemplateFileName. Then, call the PrintTemplateBitmap, PrintTemplateDib and PrintTemplateImage methods to add the bitmap, DIB, or image to the page using the size and location information specified in the template file.
Drawing on a Page
PrintPRO enables the user to draw on the page to be printed, using PrintPRO drawing methods, or by using .NET drawing methods.
-
Using .NET Drawing Methods: Call
GetGraphics to apply a .NET graphics object to the page.
-
Using PrintPRO: Use the
Draw property to acquire a PrintPRO drawing object.
This section also provides information about the following:
See Also