layout | title | keywords | description | breadcrumbText | needAutoGenerateSidebar |
---|---|---|---|---|---|
default-layout |
Troubleshooting |
dynamic .net twain, troubleshooting, application crash, LogLevel, watermark |
Troubleshooting index page |
Troubleshooting |
true |
Symptom:
Once you scan, load or capture a large number of pages, the application may crash.
Cause:
The images in buffer are out of memory.
Solutions:
-
If your application is a 32-bit application, you could compile it as a 64-bit application. It is because a 32-bit application can only use up to 2GB memory, however, a 64-bit application has no memory limit.
-
For the large volume scanning requirement, you can choose to save the images to the disk instead of holding all in the memory. You could set
TwainManager.TransferMode
to Disk File Mode. In this mode, the scanned images are transferred to a specified file directly. The Disk File Mode is ideal when transferring large images that might encounter memory limitations with Native Mode. Check outTwainManager.SetFileXFERInfo
for more information. -
You could control the buffer memory use.
- Release memory use by using
RemoveImage
,RemoveImages
,RemoveAllImages
when the number of images in the buffer is large. - Limit memory use by setting
MaxImagesInbuffer
to limit the number of images in the buffer.
LogLevel
is requested. The property returns or sets the log level for debug purpose.
Data type: Short
Syntax: ObjectName. LogLevel
Remark:
0 - The default value for LogLevel.
1 - More output information will be provided for debug
Step-by-Step Usage Guide:
-
Add LogLevel property to your codes before calling any Dynamic .NET TWAIN properties and methods, such as:
public Form_Name(){ InitializeComponent(); m_TwainManager.LogLevel=1; // please change m_TwainManager according to your setting }
-
Debug the code and open the Task Manager. Find the app progress under Progress - Apps and Dynamsoft Scanning New Module.
Right-click Dynamsoft Scanning New Module and click Open file location.
You will find the log folder under this location.
-
Then please reproduce the issue you are experiencing with Dynamic .NET TWAIN. Collect the log folder after that.
-
Please send it to [email protected]. We will then check the files and give you a proper solution.
Step-by-Step Usage Guide:
-
Add
LogLevel
property to your codes before calling any Dynamic .NET TWAIN properties and methods, such as:public Form_Name(){ InitializeComponent(); m_TwainManager.LogLevel=1; // please change m_TwainManager according to your setting }
-
Download DebugView here, and unzip locally.
-
Run Dbgview.exe.
-
Then please reproduce the issue you are experiencing with Dynamic .NET TWAIN. The DebugView will record detailed information during the process, as shown below.
-
Please click on Save to save the log file and send it to [email protected]. We will then check the files and give you a proper solution.
Step-by-Step Usage Guide:
-
Set an environment for TWAINDSM
Right click "This PC" --> Properties
--> (Advanced system settings) |Advanced tab --> click on "Environment Variables"
--> New
--> Variable name: TWAINDSM_LOG, Variable value: D:\twain.log --> OK
-
Run TWAIN Application.
-
Log file can be found under
-
TWAIN Data Source Manager 1.x
C:\Users\ User\AppData\Local\Temp\twain.log
-
TWAIN Data Source Manager 2.x
D:\twain.log
-
This KB is for Dynamic .NET TWAIN v7.x and higher only.
Because the PDF you are trying to encrypt or merge has annotations on it. For now, Dynamic .NET TWAIN doesn't support this kind of PDF in encrypt()
and merge()
methods.
Symptom:
You are trying to use Dynamic .NET TWAIN and are seeing a watermark on the image.
Cause:
The license you are using for this module has expired or is invalid/empty.
Solution:
Please contact us [email protected] for an extension to the trial license or the purchase of a permanent license. After that, please replace the old license with the following line:
TwainManager m_TwainManager = new TwainManager("<The license for TWAINScan Module>");
PDFRasterizer m_Rasterizer = new PDFRasterizer("<The license for PDF Module>");
PDFCreator m_Creator = new PDFCreator("<The license for PDF Module>");
BarcodeGenerator m_Generator = new BarcodeGenerator("<The license for Barcode Generator>");
Tesseract m_OCR = new Tesseract("<The license for OCR Module>");