Description Prepares a print job for printing by initializing the printer device content, filling the document information and calling the StartDoc Windows API command.
NOTE: This method doesn’t actually print an image it just prepares the printing.
Next, for each image that should be printed, the developer must load the image and then call the PrintDIBPage method. After calling the PrintDIBPage method, the developer must call the DropDIB method for the image if they no longer need the image. Once all of the images have been printed, the developer must call the EndPrint method. The psuedocode below demonstrates how several images can be print
1. PrepareToPrint
2. While some condition (for example from 1 to number of pages)
2.a. LoadImage
2.b. PrintDIBPage
2.c. DropDIB
3. End While
4. EndPrint
Syntax RetVal = [BIPrint.]PrepareToPrint Wnd ImgName MaxPage NumCopies Display CenterVertImg CenterHorizImg ScalePage ConvertCtoB StretchPage AllPage UseDPI NotDispCancel
Returns RetVal Integer zero on success or error code on error.
Remarks Wnd LONGLONG Window handle for the dialog boxes.
ImgName String A capture text to print.
MaxPage Integer Maximum page number that will be printed.
NumCopies Integer The number of copies to be printed.
Display Boolean Display the Print dialog box.
CenterVertImg Boolean Center the image vertically on the printer.
CenterHorizImg Boolean Center the image horizontally on the printer.
ScalePage Boolean Scale image to fit proportionally.
ConvertCtoB Boolean Convert bitmap to monochrome.
StretchPage Boolean Stretch bitmap to fit in a page.
AllPage Boolean Print all pages of a tiff file. If this parameter is true, the BiPrint control will display a status window during printing, with information showing the current page/total pages.
UseDPI Boolean Use DPI settings.
NotDispCancel Boolean Not to display the Cancel Printing dialog box.
Usage After this method, use the PrintDIBPage method to print images to one or more pages. Use the EndPrint method to finish printing. The PrintDIB method includes the PrepareToPrint, PrintDIBPage and EndPrint method calls.
See Also PrintDIBPage Method, EndPrint Method, GetCenterVertically Method, GetCenterHorizontally Method, GetNumberOfCopies Method, GetScalePage Method, GetStretchPage Method, GetAllPages Method, GetUseDPI Method