Discussion:
gb.scanner
(too old to reply)
Johny Provoost
2015-03-11 16:58:39 UTC
Permalink
Hello,

Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.

I'll tried

Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End

scanners.search find my scanner (see in the terminal window:
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
but myscan.scan(HPScan) gives 'Null Object'

Do I somewhere config my scanner like you have to config your printer?

Regards,
Johny
Fabien Bodard
2015-03-11 18:10:50 UTC
Permalink
Post by Johny Provoost
Hello,
Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.
I'll tried
Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
Post by Johny Provoost
but myscan.scan(HPScan) gives 'Null Object'
Do I somewhere config my scanner like you have to config your printer?
Regards,
Johny
Well I've not documented the component yet

But you must do :

Himg =Scanners["
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"].scan()

Or

Hmyscan as scanner
Hmyscan =scanners["hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"]

Himg=Hnyscan.scan()

I will send an example on the farm quikly

-----------------------------------------------
Post by Johny Provoost
Dive into the World of Parallel Programming The Go Parallel Website,
sponsored
Post by Johny Provoost
by Intel and developed in partnership with Slashdot Media, is your hub
for all
Post by Johny Provoost
things parallel software development, from weekly thought leadership
blogs to
Post by Johny Provoost
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Johny Provoost
2015-03-11 18:24:29 UTC
Permalink
Post by Johny Provoost
Post by Johny Provoost
Hello,
Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.
I'll tried
Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
Post by Johny Provoost
but myscan.scan(HPScan) gives 'Null Object'
Do I somewhere config my scanner like you have to config your printer?
Regards,
Johny
Well I've not documented the component yet
Himg =Scanners["
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"].scan()
Or
Hmyscan as scanner
Hmyscan =scanners["hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"]
Himg=Hnyscan.scan()
I will send an example on the farm quikly
-----------------------------------------------
Thank you Fabian.
Can start now. Looking forward to your example.

Johny
Ron
2015-03-11 20:02:37 UTC
Permalink
Here a cleanup of an already existing Gambas Scanner app using
scanimage cli command I use regularly.
https://github.com/cyberjunky/gbscan/

It does all the option parsing from cli output...

Maybe we can make it better using gb.scanner component and vice versa..
Thinks I want to add are digital stamps like "Confidential" and signatures...

Regards,
Ron.
Post by Johny Provoost
Post by Johny Provoost
Post by Johny Provoost
Hello,
Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.
I'll tried
Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
Post by Johny Provoost
but myscan.scan(HPScan) gives 'Null Object'
Do I somewhere config my scanner like you have to config your printer?
Regards,
Johny
Well I've not documented the component yet
Himg =Scanners["
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"].scan()
Or
Hmyscan as scanner
Hmyscan =scanners["hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"]
Himg=Hnyscan.scan()
I will send an example on the farm quikly
-----------------------------------------------
Thank you Fabian.
Can start now. Looking forward to your example.
Johny
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Johny Provoost
2015-03-12 09:53:15 UTC
Permalink
Thank you Ron. Will look in to it.
Regards
Johny
Post by Ron
Here a cleanup of an already existing Gambas Scanner app using
scanimage cli command I use regularly.
https://github.com/cyberjunky/gbscan/
It does all the option parsing from cli output...
Maybe we can make it better using gb.scanner component and vice versa..
Thinks I want to add are digital stamps like "Confidential" and signatures...
Regards,
Ron.
Post by Johny Provoost
Post by Johny Provoost
Post by Johny Provoost
Hello,
Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.
I'll tried
Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
Post by Johny Provoost
but myscan.scan(HPScan) gives 'Null Object'
Do I somewhere config my scanner like you have to config your printer?
Regards,
Johny
Well I've not documented the component yet
Himg =Scanners["
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"].scan()
Or
Hmyscan as scanner
Hmyscan =scanners["hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"]
Himg=Hnyscan.scan()
I will send an example on the farm quikly
-----------------------------------------------
Thank you Fabian.
Can start now. Looking forward to your example.
Johny
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
*Vriendelijke Groeten*

*Johny Provoost*

*mailto: ***@skynet.be <mailto:***@skynet.be>*

*mailto: ***@gmail.com <mailto:***@gmail.com>*

*Website:* *http://www.johnyprovoost.net* <http://www.johnyprovoost.net/>
Fabien Bodard
2015-03-12 13:22:35 UTC
Permalink
Hi ron

Pretty piece of code :-)


gb.scanner is based on scanimage too. It just give an object oriented
simplified interface. Thank you for sharing your code,
and you are welcome to help me to inprove gb.scanner if you have some
time to share :-).

It miss multipages, preview and surely many other features.

For stamps, i suggest you to use gb.report2 with a translucy floating label.
Post by Ron
Here a cleanup of an already existing Gambas Scanner app using
scanimage cli command I use regularly.
https://github.com/cyberjunky/gbscan/
It does all the option parsing from cli output...
Maybe we can make it better using gb.scanner component and vice versa..
Thinks I want to add are digital stamps like "Confidential" and signatures...
Regards,
Ron.
Post by Johny Provoost
Post by Johny Provoost
Post by Johny Provoost
Hello,
Is there's some place where I can get some more help about gb.scanner.
The help in Gambas doesn't show much.
I'll tried
Public Sub Button1_Click()
Dim HPScan As Image
Dim MyScan As Scanner
Scanners.Search
MyScan.Scan(HPScan)
End
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604|Hewlett-Packard|Deskjet_2540_series|all-in-one)
Post by Johny Provoost
but myscan.scan(HPScan) gives 'Null Object'
Do I somewhere config my scanner like you have to config your printer?
Regards,
Johny
Well I've not documented the component yet
Himg =Scanners["
hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"].scan()
Or
Hmyscan as scanner
Hmyscan =scanners["hpaio:/usb/Deskjet_2540_series?serial=CN38T2DM680604"]
Himg=Hnyscan.scan()
I will send an example on the farm quikly
-----------------------------------------------
Thank you Fabian.
Can start now. Looking forward to your example.
Johny
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
Continue reading on narkive:
Loading...