Scanning multiple pages into the Viewer object?

Example requests & Code samples for GdPicture Toolkits.
Post Reply
Posts: 29
Joined: Fri Mar 28, 2008 3:16 am

Scanning multiple pages into the Viewer object?

Post by mreynolds » Fri Apr 25, 2008 4:40 am

I can DisplayFromPdfFile and end up with multiple pages in the Viewer, but if I use AxGdViwer1.DisplayFromGdPictureImage(AxImaging1.GetNativeImage) each time I do it the previous picture gets overwritten and I never end up with more than one image in the Viewer. How do I scan from the scanner and transfer the image to the Viewer object such that I'll get multiple pages in the Viewer object?

I don't want to have to program two different means of traversing backwards and forwards through the pages, since I can use DisplayNextFrame and DisplayPreviousFrame after reading in a PDF file, but then having to deal with scanned in images in a completely different way, grabbing one at a time from the Imaging object.

User avatar
Site Admin
Posts: 5682
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Scanning multiple pages into the Viewer object?

Post by Loïc » Fri Apr 25, 2008 1:21 pm


Using the last release of GdPicture Pro you can create easily a multipage tiff image from scanned images using an Imaging object and set this image into a GdViewer control.


Code: Select all

Dim nAcquiredImage As Long
Dim nTiffMultipage As Long
Dim nPageCount As Long

nPageCount = 0
Imaging1.TwainSetAutoFeed (True)
Imaging1.TwainSetAutoScan (True)

While Imaging1.CreateImageFromTwain <> 0
      nPageCount = nPageCount + 1
      nAcquiredImage = Imaging1.GetNativeImage
      If nPageCount = 1 Then
         nTiffMultipage = Imaging1.TiffCreateMultiPageFromGdPictureImage(nAcquiredImage)
         Call Imaging1.TiffAppendPageFromGdPictureImage(nTiffMultipage, nAcquiredImage)
      End If
      Imaging1.CloseImage (nAcquiredImage)

GdViewer1.SetNativeImage (nTiffMultipage)
Best regards,

Loïc Carrère

Posts: 2
Joined: Sun Apr 07, 2013 9:51 am

How to Insert page from scan

Post by JackHoward » Sun Apr 07, 2013 10:00 am

Hi. I want to insert some pages from scanner when some pages has been scaned and displayed in gdviewer. I can not found some like that samples. I don't know how to do,output file format is Tiff.

Posts: 439
Joined: Wed Nov 22, 2017 9:52 am

Re: How to Insert page from scan

Post by Gabriela » Wed Jan 30, 2019 5:46 pm

Kind regards,

GdPicture Team

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest