GdPicture14 Status FileNotFound in line TwainAcquireToFile

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
JonaTeam
Posts: 2
Joined: Fri Feb 22, 2019 2:52 am

GdPicture14 Status FileNotFound in line TwainAcquireToFile

Post by JonaTeam » Fri Feb 22, 2019 2:55 am

Good After.
Please your support.
I have an application development in C#.net and I has use GdPicture14 for digitalize with a scanner Fujitsu fi-60F.
My application had connect the scanner and open the source correctly but in the moment of digitalize a sheet in this line "_oGdPictureImaging.TwainAcquireToFile(@"C:\TEMP\IMAGEN_" + _indicePagina + ".jpg",parHandle);" the object of the class GdPictureStatus return a type code 10 - FileNotFound and not generate the image acquired of the scanner.
This Status is not always, sometimes return status OK. I review the phisycal memory and Hard Disk but the level of consumer is normal.
Please of your support for this case or any idea for resolve this problem.
Add a fragment of code.



_oGdPictureImaging.TwainSetAutoFeed(true);
_oGdPictureImaging.TwainSetAutoScan(true);
_oGdPictureImaging.TwainSetResolution(300);
_oGdPictureImaging.TwainEnableDuplex(false);
_oGdPictureImaging.TwainSetHideUI(true);
_oGdPictureImaging.TwainSetPaperSize(TwainPaperSize.NONE);
_oGdPictureImaging.TwainSetAutomaticRotation(true);
_oGdPictureImaging.TwainSetIndicators(false);
_oGdPictureImaging.TwainSetAutomaticBorderDetection(true);
_oGdPictureImaging.TwainSetAutomaticDiscardBlankPages(true);
_oGdPictureImaging.TwainSetCompression(TwainCompression.TWCP_GROUP4);
_oGdPictureImaging.TwainSetPixelType(TwainPixelType.TWPT_RGB);
GdPictureStatus objStatus = _oGdPictureImaging.TwainAcquireToFile(@"C:\TEMP\IMAGEN_" + _indicePagina + ".jpg",parHandle);
if (GdPictureStatus.OK == objStatus)
{
MessageBox.Show("Image true");
}
else
{
MessageBox.Show("Image false");
}
Please of your support.
Thanks

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: GdPicture14 Status FileNotFound in line TwainAcquireToFile

Post by Gabriela » Fri Feb 22, 2019 11:32 am

Hello,

The FileNotFound status means that the transferred file does not exist. You can find out the possible reason for this using these methods:
https://www.gdpicture.com/guides/gdpicture/web ... tCode.html
https://www.gdpicture.com/guides/gdpicture/web ... nCode.html

JonaTeam
Posts: 2
Joined: Fri Feb 22, 2019 2:52 am

Re: GdPicture14 Status FileNotFound in line TwainAcquireToFile

Post by JonaTeam » Fri Feb 22, 2019 8:55 pm

Hello Gabriela.

I established the methods that you indicated to me and this is obtained in response to the methods.

1. When the image is generated, the result is as follows:
TwainGetLastConditionCode = TWCC_SUCCESS
TwainGetLastResultCode = TWRC_XFERDONE

2. When the image is not generated, the result is as follows:
TwainGetLastConditionCode = TWCC_SUCCESS
TwainGetLastResultCode = TWRC_SUCCESS

Specifically for the second case although the result is TWRC_SUCESS, the scanned image is not being generated from the scanner in the specified path.

Please support you as we do not find a pattern that tells us where we have to make changes.

Thanks in advance and greetings.

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: GdPicture14 Status FileNotFound in line TwainAcquireToFile

Post by Gabriela » Tue Mar 12, 2019 2:03 pm

Hello,

The returned status FileNotFound from the TwainAcquireToFile() method is actually returned from the TWAIN DSM/device driver, which means outside the GdPicture.NET toolkit. It says that the generated file is missing, but we do not know the exact reason here.

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest