Loading...

Scanning new page in multi-page TIFF

Example requests & Code samples for legacy GdPicture products (V 1-2-3-4-5 Series).

Scanning new page in multi-page TIFF

Postby jmantha » Sat Feb 27, 2010 10:51 pm

Hi,

Could you give me a quick example on how to open an already existing multi-page tiff file, scanning a new page at the end and saving it back to file.

Thanks !

Joé
jmantha
 
Posts: 2
Joined: Sat Feb 27, 2010 10:41 pm

Re: Scanning new page in multi-page TIFF

Postby Loïc » Tue Mar 02, 2010 12:21 pm

Hi Joé,

See following sample:



Code: Select all
Private Sub Command4_Click()
 Dim nImageID As Long
 Dim nTiffImageID As Long

 If Imaging1.TwainOpenDefaultSource() Then
    nTiffImageID = Imaging1.TiffCreateMultiPageFromFile("c:\test.tif")
      nImageID = Imaging1.TwainAcquireToGdPictureImage(Me.hWnd)
      If nImageID <> 0 Then
         Call Imaging1.TiffAppendPageFromGdPictureImage(nTiffImageID, nImageID)
         Call Imaging1.CloseImage(nImageID)
         Call Imaging1.TiffSaveMultiPageToFile(nTiffImageID, "c:\out.tif")
      End If
     
      Call Imaging1.TwainCloseSource
      MsgBox "Done !"
 Else
      MsgBox "can't open default source, twain state is: " & Trim(Str(Imaging1.TwainGetState))
 End If
End Sub



Hope this helps !

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Scanning new page in multi-page TIFF

Postby jmantha » Tue Mar 02, 2010 10:13 pm

Thanks !! Works great !
jmantha
 
Posts: 2
Joined: Sat Feb 27, 2010 10:41 pm


Return to Example requests for Gdpicture V 1-2-3-4-5 Series [Legacy]

Who is online

Users browsing this forum: No registered users and 0 guests

cron