|
|
 |
Superuse$ Superuse 02/15/2007 :: 16:19
Anonyme
| | Hi,
i use the current 2.9xx Version and try to use the sample Twain Scanning with "Scan all documents feeder (ADF) info multipage.pdf... The scanning-part is working, till the last document is scanned... But after the last document is scanned the while-loop "While oGdPicture.TwainAcquire(Me.hWnd) = 0" hang's... It looks like the scanner wait for the next page. I can only kill the hole application. I tried the new beta of the Twain.dll, but the scanning don't work with this DLL. The Beta don't scan any document. I use a Ricoh 1515 for the scanning part. Anybody know a solution? | |
 |
Superuse$ Superuse 05/24/2007 » 10:56
Anonyme
| | ok... find a solutions by myself in the forum:
Please download the last GDTWAIN.dll file at http://www.gdpicture.com/ressources/ocx/GDTWAIN.dll and copy it in c:\windows\system32\
This DLL work... but why is this dll included in the current package and why don't the 3.0 Beta don't work. 3.0 don't scan any page...
Edited by @lcarrere | |
 |
Superuse$ Superuse 02/15/2007 :: 16:52
Anonyme
| | hm... new problem... Now it works exact 1 times... after the first multipage-Scan, i get at the second the Message "Can't open default Source". If i select a different scanner (i have 5 different scanners installed, but only one Multi-page-scanner) i can scan. But if i select the Ricoh 1515 i get this massage... After a reboot it works again only 1 times... my code is:
Dim nImageCount As Long Dim nCpt As Long Dim oGdPicture As GdpicturePro.cGdPicture Dim nPdfPagesHeight As Long Dim nPdfPagesWidth As Long Set oGdPicture = New GdpicturePro.cGdPicture oGdPicture.SetLicenceNumber ("000000") 'removed oGdViewer.SetLicenceNumber ("000000") 'removed ' oGdPicture.TwainSelectSource ' oGdPicture.TwainSetDebugMode (True) If oGdPicture.TwainOpenDefaultSource() Then
nImageCount = 0
If oGdPicture.TwainSetAutoFeed(True) Then 'Set AutoFeed Enabled oGdPicture.TwainSetHideUI (True) oGdPicture.TwainSetCurrentResolution (100) oGdPicture.TwainSetCurrentPixelType (2) 'RGB oGdPicture.TwainSetCurrentBitDepth (1) ' 24 bpp Call oGdPicture.PdfNewPdf(App.Path & "\multipage.pdf", "Title", "Creator", "Author", "Producer") oGdPicture.PdfSetMeasurementUnits (0) While oGdPicture.TwainAcquire(Me.hWnd) = 0 If chkPreview.Value = 1 Then oGdViewer.DisplayFromImageRef (oGdPicture.GetNativeImage) End If nImageCount = nImageCount + 1 oGdPicture.PdfAddImageFromImageID (oGdPicture.GetNativeImage()) If nImageCount = 1 Then nPdfPagesHeight = oGdPicture.GetHeight nPdfPagesWidth = oGdPicture.GetWidth End If Wend
Call oGdPicture.PdfSetPageDimensions(nPdfPagesWidth, nPdfPagesHeight) For nCpt = 1 To nImageCount oGdPicture.PdfNewPage Call oGdPicture.PdfDrawImage(nCpt, 1, 1, nPdfPagesWidth, nPdfPagesHeight) oGdPicture.PdfEndPage Next nCpt Call oGdPicture.PdfSavePdf MsgBox "Done !" Else MsgBox "scanner does not support ADF mode" End If Call oGdPicture.TwainCloseSource(Me.hWnd) Else MsgBox "can't open default source" End If Set oGdPicture = Nothing
| |
 |
Loïc$2006306 Loïc 02/15/2007 :: 17:59
Registered
| | Hi,
This problem was solved in the last release (Beta for the moment).
You can find it at http://www.gdpicture.com/ressources/betas/
You have to update gdpicturepro.ocx and GDTWAIN.dll
Best regards,
Loïc Carrère | |
 |
Superuse$ Superuse 02/26/2007 :: 15:24
Anonyme
| | I changed now the gdpicturepro.ocx and gdtwain.dll to the current beta-versions... If i now scan with the AFD-Scanner i can scan one times... after that is get the message "can't open default source". I must reboot my pc to scan again... What can i do now? | |
 |
Loïc$2006306 Loïc 05/24/2007 » 10:47
Registered
| | Hi,
Please, use this following code instead this above: or download this sample: _______
Dim nImageCount As Long Dim nCpt As Long Dim oGdPicture As New GdpicturePro.cGdPicture Dim nPdfPagesHeight As Long Dim nPdfPagesWidth As Long Dim nImageID As Long oGdPicture.SetLicenceNumber ("0012345678910111213141516") 'Demo code version If oGdPicture.TwainOpenDefaultSource() Then nImageCount = 0
oGdPicture.TwainSetAutoFeed (True) 'Set AutoFeed Enabled oGdPicture.TwainSetAutoScan (True) 'To achieve the maximum scanning rate oGdPicture.TwainSetHideUI (True) oGdPicture.TwainSetCurrentResolution (200) oGdPicture.TwainSetCurrentPixelType (2) 'RGB oGdPicture.TwainSetCurrentBitDepth (8) ' 24 bpp Call oGdPicture.PdfNewPdf(App.Path & "\multipage.pdf", "Title", "Creator", "Author", "Producer") oGdPicture.PdfSetMeasurementUnits (0) nImageID = oGdPicture.CreateImageFromTwain(Me.hWnd) While nImageID <> 0 If chkPreview.Value = 1 Then oGdViewer.DisplayFromImageRef (nImageID) DoEvents End If nImageCount = nImageCount + 1 oGdPicture.PdfAddImageFromImageID (nImageID) If nImageCount = 1 Then nPdfPagesHeight = oGdPicture.GetHeight nPdfPagesWidth = oGdPicture.GetWidth End If nImageID = oGdPicture.CreateImageFromTwain(Me.hWnd) Wend
Call oGdPicture.PdfSetPageDimensions(nPdfPagesWidth, nPdfPagesHeight) For nCpt = 1 To nImageCount oGdPicture.PdfNewPage Call oGdPicture.PdfDrawImage(nCpt, 1, 1, nPdfPagesWidth, nPdfPagesHeight) oGdPicture.PdfEndPage Next nCpt Call oGdPicture.PdfSavePdf
Call oGdPicture.TwainCloseSourceManager(Me.hWnd) MsgBox "Done !" Else MsgBox "can't open default source, twain state is: " & Trim(Str(oGdPicture.TwainGetState)) End If Set oGdPicture = Nothing
What's append now ?
Best regards,
Loïc Carrère
Edited by @lcarrere | |
 |
Superuse$ Superuse 03/14/2007 :: 15:53
Anonyme
| | ok... this sample now works... there are only 2 new little problems. when i scan with ADF, i get the message 33696 after the last page. The message-text is german, so i think, that is from the twain-driver... Message-text is like: "Put the draft at the ADF" After that i get a second message "Done". How can i switch of this messages?
| |
 |
Superuse$ Superuse 03/14/2007 :: 16:21
Anonyme
| | i forgot to tell you, that i get the first message after i have scaned several pages | |
 |
Loïc$2006306 Loïc 03/29/2007 :: 11:50
Registered
| | To remove the two message box use this code:
Dim nImageCount As Long Dim nCpt As Long Dim oGdPicture As New GdpicturePro.cGdPicture Dim nPdfPagesHeight As Long Dim nPdfPagesWidth As Long Dim nImageID As Long
oGdPicture.SetLicenceNumber ("0012345678910111213141516") 'Demo code version
If oGdPicture.TwainOpenDefaultSource() Then nImageCount = 0
oGdPicture.TwainSetAutoFeed (True) 'Set AutoFeed Enabled oGdPicture.TwainSetAutoScan (True) 'To achieve the maximum scanning rate oGdPicture.TwainSetHideUI (True) oGdPicture.TwainSetCurrentResolution (200) oGdPicture.TwainSetCurrentPixelType (2) 'RGB oGdPicture.TwainSetCurrentBitDepth (8) ' 24 bpp
Call oGdPicture.PdfNewPdf(App.Path & "\multipage.pdf", "Title", "Creator", "Author", "Producer") oGdPicture.PdfSetMeasurementUnits (0)
nImageID = oGdPicture.CreateImageFromTwain(Me.hWnd) While nImageID <> 0 If chkPreview.Value = 1 Then oGdViewer.DisplayFromImageRef (nImageID) DoEvents End If nImageCount = nImageCount + 1 oGdPicture.PdfAddImageFromImageID (nImageID) If nImageCount = 1 Then nPdfPagesHeight = oGdPicture.GetHeight nPdfPagesWidth = oGdPicture.GetWidth End If If oGdPicture.TwainGetState >= TWAIN_TRANSFER_READY Then nImageID = oGdPicture.CreateImageFromTwain(Me.hWnd) Else nImageID = 0 End If Wend
Call oGdPicture.PdfSetPageDimensions(nPdfPagesWidth, nPdfPagesHeight) For nCpt = 1 To nImageCount oGdPicture.PdfNewPage Call oGdPicture.PdfDrawImage(nCpt, 1, 1, nPdfPagesWidth, nPdfPagesHeight) oGdPicture.PdfEndPage Next nCpt Call oGdPicture.PdfSavePdf
Call oGdPicture.TwainCloseSourceManager(Me.hWnd) MsgBox "Done !" Else MsgBox "can't open default source, twain state is: " & Trim(Str(oGdPicture.TwainGetState)) End If
Set oGdPicture = Nothing
Best regards,
Loïc Carrère
| |
 |
Superuse$ Superuse 03/29/2007 :: 16:10
Anonyme
| | It work.... great support!!! | |
 |
Loïc$2006306 Loïc 03/29/2007 :: 16:13
Registered
| | Thanks!
Great users make great support...
Loïc Carrère. | |