This example uses an ImagXpress control to load a multi-page (TIFF, PDF, ICO, MODCA or DCX) file, PrintPRO then prints them, one page at a time.
Example Title | ![]() |
---|---|
' define the variables Dim a As Integer Dim b As Integer Dim counter As Integer ' start the print document PrintPRO1.PrintDialog PrintPRO1.StartPrintDoc ' set the counter to go through each page of the document For counter = 1 To ImagXpress1.NumPages(ImagXpress1.FileName) IX1.PageNbr = counter IX1.FileName = ImagXpress1.FileName PrintPRO1.hDib = ImagXpress1.hDib ' set the margins a = PrintPRO1.ScaleWidth - 1 - PrintPRO1.LMargin b = PrintPRO1.ScaleHeight - 1 - PrintPRO1.TMargin - PrintPRO1.BMargin PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True PrintPRO1.NewPage ' iterate through each page Next counter ' end print document when all pages are complete PrintPRO1.EndPrintDoc |