How to detect paper not inserted properly?
Moderator: Alex
-
- Posts: 47
- Joined: Fri Oct 10, 2008 3:52 pm
How to detect paper not inserted properly?
How do I detect if the paper is not properly inserted into the scanner, ie hitting the paper indicator clip?
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: How to detect paper not inserted properly?
Hello Bill,
Please read the "Error Trapping" topic in the "Getting Started" section of documentation.
Here is an example that demonstrates how to intercept paper jam or double feeding of paper:
Best regards, Alexander
Please read the "Error Trapping" topic in the "Getting Started" section of documentation.
Here is an example that demonstrates how to intercept paper jam or double feeding of paper:
Code: Select all
Public Sub ScanWithUI()
' set the application name
VSTwain1.AppProductName = "MyTwainApplication"
Try
' initialize the library
VSTwain1.StartDevice
' show "Select Source" dialog
VSTwain1.SelectSource
' enable the user interface (false - disable the user interface)
VSTwain1.ShowUI = true
' start asynchronous acquisition process
VSTwain1.Acquire
Catch ex As TwainException
MsgBox ex.Message
End Try
End Sub
...
Private Sub VSTwain1_ScanCompleted(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles VSTwain1.ScanCompleted
' show error message if error occur
If VSTwain1.ErrorCode <> ErrorCode.None Then
If VSTwain1.ErrorCode = ErrorCode.FeederProblem Then
MsgBox("Paper is jammed or double feeded.")
End If
' show message "Scan process is completed."
Else
MsgBox("Scan process is completed.")
End If
End Sub