图像处理工具包ImagXpress打印图像方法解析
ImagXpress1.FileName = "C:\IMAGES\BIRD.JPG"Printer.Print "" ' Assumes twips so use ImagWidth and ImagHeightImagXpress1.PrintImage Printer.hDC, 0, 0, ImagXpress1.ImagWidth, ImagXpress1.ImagHeight, IX_GraphicsUnit_Twip, IX_PrintType_FullImagePrinter.EndDoc
?
使用PrintPRO打印图像:??? ImagXpress PrintImage方法需要一个来自容器的打印DC,然而在某些容器中,打印机DC是不可用的。在这种情况下,PrintPRO就提供了一个 vehicle来打印到一个选定的打印设备上。如果你需要一个定制的打印机接口和编程控制印刷功能,PrintPRO可以提供最好的解决方案。
?? VB示例,如何使用ImagXpress和 PrintPRO打印一个图像:
// This code demonstrates how to print an image using ImagXpress and PrintPRODim a As IntegerDim b As IntegerPrintPRO1.hDIB = Xpress1.hDIBPrintPRO1.ScaleMode = SCALE_PixelPrintPRO1.StartPrintDoca = PrintPRO1.ScaleWidth - PrintPRO1.LMarginb = PrintPRO1.ScaleHeight - PrintPRO1.TMargin - PrintPRO1.BMarginPrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, TruePrintPRO1.EndPrintDoc
?VB示例,如何使用ImagXpress和 PrintPRO打印一个多页的 TIFF图像:
// This code demonstrates how to print a multi-page TIFF image using ImagXpress and PrintPROPrintPRO1.PrintDialogPrintPRO1.StartPrintDocFor counter = 1 To IX1.NumPages(IX1.FileName) IX1.PageNbr = counter IX1.FileName = IX1.FileName PrintPRO1.hDIB = IX1.hDIB 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.NewPageNext counterPrintPRO1.EndPrintDoc
?