Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, January 5, 2010 9:48:41 PM(UTC)
Simon2009

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.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, January 6, 2010 3:58:31 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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:06:42 PM(UTC)
Simon2009

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:39:45 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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:20:06 PM(UTC)
Simon2009

Groups: Registered
Posts: 10


thanks, that does the job and fixed the other issue.
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.163 seconds.