LEADTOOLS Support
Document
Document SDK Questions
Printing multi-page TIFF with RasterImagePrinter in VB6
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, January 5, 2010 9:43:41 PM(UTC)
Groups: Registered
Posts: 10
I'm using v16.5 Com Interop libraries.
I need to print multi-page tiffs. So far I've tried the RasterImagePrinter.PrintImage; looping through each page and printing. And the cancel dialog will pop-up for each page.
Is there a way to perform this operation more efficiently?
Thanks.
#2
Posted
:
Wednesday, January 6, 2010 3:53:31 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Since you are using v16.5 Com Interop components, the best way to print your multi-page file is to use the RasterImagePrinter.PrintImage method.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Monday, January 18, 2010 5:01:42 PM(UTC)
Groups: Registered
Posts: 10
For example, I want to print a multipage tiff with 3 pages, the 3 cancel dialogs popup on the screen. Can you suggest a way for me to handle this situation.
#4
Posted
:
Tuesday, January 19, 2010 2:34:45 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
You can use low-level printing using the Visual Basic 6 printer object. Here's sample code:
--------
Set rasterViewer.image = rasCodecs.Load_12("D:\TestFolder\MultiPage.tif")
Printer.Print "" 'init printer
Dim pp As RasterPaintProperties
Set pp = rasterViewer.PaintProperties
Dim rectPrinter As New Rectangle
rectPrinter.x = 0
rectPrinter.Y = 0
rectPrinter.Width = Printer.Width / Printer.TwipsPerPixelX
rectPrinter.Height = Printer.Height / Printer.TwipsPerPixelY
Dim i As Integer
For i = 1 To rasterViewer.image.PageCount
rasterViewer.image.Page = i
rasterViewer.image.Paint_3 Printer.hDC, rectPrinter, pp
If i = rasterViewer.image.PageCount Then
Printer.EndDoc
Else
Printer.NewPage
End If
Next i
--------
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#5
Posted
:
Tuesday, January 19, 2010 3:15:06 PM(UTC)
Groups: Registered
Posts: 10
thanks, that does the job and fixed the other issue.
LEADTOOLS Support
Document
Document SDK Questions
Printing multi-page TIFF with RasterImagePrinter in VB6
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.