List Of Available Devices is Always 0

Questions, comments and suggestions concerning VintaSoft Twain ActiveX.

Moderator: Alex

daniele.frisenna
Posts: 8
Joined: Tue Jul 23, 2019 1:13 pm

Re: List Of Available Devices is Always 0

Post by daniele.frisenna » Wed Jul 24, 2019 12:47 pm

Hello Alex.

Now following this istruction:

daniele.frisenna
Posts: 8
Joined: Tue Jul 23, 2019 1:13 pm

Re: List Of Available Devices is Always 0

Post by daniele.frisenna » Wed Jul 24, 2019 12:55 pm

Hello Alex.
Now following your suggestion and this instruction:

The TWAIN DSM (twain_32.dll) and DSM can be copied into the user’s Windows directory.
To do this, copy <Windows Drive>:\Windows\twain_32.dll and the entire <Windows Drive>:\Windows\TWAIN directory into
C:\Documents and Settings\UserName\Windows, or equivalent directory.
I can reach the same result as Advanced Demo App using Power Builder Application on "Production Test PC" via Terminal Server.
But now, if decide to save acquired image as pdf (bmp is oK!!!) to specific folder nothing happen !

Here my PB code:

Code: Select all

boolean SaveAllImages = true
boolean esito = false
string FileExtension = "pdf"

ole_twain_control.Object.JpegEncoder_JpegQuality = 90;
string filename = "C:\test\testsavefile." + FileExtension;

IF (SaveAllImages) THEN
	esito = ole_twain_control.Object.AcquiredImages_Save(0, filename)
	int i =0;
	// save second and next images
	FOR i = 1 TO ole_twain_control.Object.AcquiredImages_Count - 1
		esito = ole_twain_control.Object.AcquiredImages_Save(i, filename)
	NEXT

END IF


IF (esito = FALSE) THEN 
    MessageBox("ERRORE", String(ole_twain_control.Object.errorString))
ELSE
    MessageBox("OK", "salvataggio completato")	
END IF

Best regards

Alex
Site Admin
Posts: 1730
Joined: Thu Jul 10, 2008 2:21 pm

Re: List Of Available Devices is Always 0

Post by Alex » Wed Jul 24, 2019 2:13 pm

But now, if decide to save acquired image as pdf (bmp is oK!!!) to specific folder nothing happen !
Please check result of AcquiredImages_Save method and you will see that method returns error because the evaluation version does not allow to save color images to PDF document. Please for tests acquire black-white or grayscale images from scanner and save them to PDF document.

Also please read about limitations of evaluation version here: https://www.vintasoft.com/vstwain-faq.html

Best regards, Alexander

daniele.frisenna
Posts: 8
Joined: Tue Jul 23, 2019 1:13 pm

Re: List Of Available Devices is Always 0

Post by daniele.frisenna » Fri Jul 26, 2019 11:02 am

Hello Alex.
I resolved all mentioned problem in this post about the Twain ActiveX and today the administrative * of company where I work have purchased the Site License of your ActiveX.

1.000.000 Thanks...
Best regards
Daniele F.

Alex
Site Admin
Posts: 1730
Joined: Thu Jul 10, 2008 2:21 pm

Re: List Of Available Devices is Always 0

Post by Alex » Fri Jul 26, 2019 11:39 am

Hello Daniele,

Thank you for your order. Let me know if you will have any question or problem.

Best regards, Alexander

Post Reply