I am working on gdpicture pro version 5.9.3.
I am facing issues with creating a duplicate copy of a multipage tiff image. I am using a code similar to the following:
- Code: Select all
If FileExist Then
fs.CreateFolder (Environ("temp") & "\imgTemp")
Set oGdScanNext = New GdpicturePro5.cImaging
oGdScanNext.SetLicenseNumber (GDPROserial)
oGdScanNext.CreateImageFromFile (Environ("temp") & "\" & "save_" & strAppID & "\" & strFileName & ".tif")
lImageID = oGdScanNext.GetNativeImage
If oGdScanNext.TiffIsMultiPage(lImageID) Then
iPgCount = oGdScanNext.TiffGetPageCount(lImageID)
Else
iPgCount = 1
End If
For iPCount = 1 To iPgCount
Call oGdScanNext.TiffSelectPage(lImageID, iPCount)
If iPCount = 1 Then
lOgdImgId = oGdScanNext.TiffSaveAsNativeMultiPage(Environ("temp") & "\imgTemp\" & strFileName & ".tif", lCompression)
Else
lOgdImgId = oGdScanNext.TiffAddToNativeMultipage(oGdScanNext.GetNativeImage)
End If
Next
All I am trying out is to create a dummy folder by the name imgTemp on the %temp% directory if a folder by the name save_XXX is found.
Then copy the files of the save_XXX to the imgTemp folder. Proceed with the scan operation and then merge the newly scanned image to the tiff image of the imgTemp folder.
Then save the resultant image to the save_XXX folder.
I could do this successfully for the first time that is if I have a single paged tiff image on the save_XXX folder. In case of a multipage tiff on the save_XXX folder, the operation fails.
I found a error number 7 [Win32error] on the line oGdScanNext.TiffAddToNativeMultipage(oGdScanNext.GetNativeImage). Please guide me through this issue.
Regards,
Nirmal Kumar L
