PeasyScan Image Scanner Program

Word processors, spreadsheets, presentations, translation, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

PeasyScan Image Scanner Program

#1 Post by rcrsn51 »

Update: V2.13 has a new option when saving a scan to PDF. You can now include compression (JPG or GZ) which yields much smaller PDFs. PeasyScan uses tiff2pdf and the results may depend on your version. Also, some PDF viewers may not display these compressed PDFs. YMMV.

To use compression, you need a config file with the extra line

Code: Select all

export PDFCOMPRESS=""  # insert -j or -z
Update: PeasyScan v2.5 has improved batch scanning. In previous versions, you could scan a set of pages using an Automatic Document Feeder. Now you can also use the flatbed. The Auto function has a new option that pauses between scans so you can switch documents. All the other ADF features are the same, including the use of configuration files. Read more below.

------------------------------

PeasyScan is a light-weight alternative to the Xsane image scanner program. It uses the same backend tools as Xsane, but with a simpler user interface.

PeasyScan scans into PNG, JPG, TIF or PDF files. For OCR using Tesseract, see the pic2txt app posted farther down this thread.

The installer adds a menu entry under Graphic. To make a desktop shortcut, drag the peasyscan program from /usr/local/peasyscan onto the desktop. There is a matching icon in /usr/share/pixmaps.

See the recipe for using PeasyScan in the next post.

Note: On some scanners, you may need to select Preferences > Show Advanced Options to see the scanning controls.

Also: If you start getting a "Nothing was scanned" message, click the Reset button on the main screen.

----------------------------

Configuration files: Most scanners will work without a configuration file, but there are a few situations where you need one. The files are stored in the folder /usr/local/peasyscan/config. When PeasyScan starts, it searches for any configuration files and offers you a menu from which to choose. Give your configuration file a descriptive name.

The PeasyScan package includes a sample configuration file in the folder /usr/local/peasyscan.

Code: Select all

export URI="hpaio:/net/hp_laserjet_pro_mfp_m127fn?ip=192.168.2.215"
export SOURCE="ADF"
export MODE="Gray"
export RESOLUTION="300"
export PAPER="letter"
export PDFCOMPRESS=""
export OTHER=""  #insert any other scanner options here
To see what choices apply to your model, run the scanner in regular flatbed mode. Or use the command "scanimage -h".

The SOURCE, MODE and RESOLUTION options only apply to Auto scanning. However, if your unit doesn't have an actual ADF, you can use the Auto button and a configuration file to preset these options for flatbed scanning.

To control the size of the ADF scan, use the PAPER option. The values are: letter, legal, A4, A5, A6, B6.
Note: PeasyScan can be easily modified to accept other paper sizes like A3. Just ask.

For example, to scan a batch of 4x6 photos, use:

Code: Select all

export SOURCE="Flatbed"
export MODE="Color"
export RESOLUTION="150"
export PAPER="A6"  #the metric size
For more information about the URI option, see below.

----------------------------

Automatic Document Feeder: The main PeasyScan window has an Auto button. Before clicking it, select the image format and the output filename. With Auto scanning, you need only enter the document's base name. For example, if you enter "/root/report", the files will be saved as "report-01.pdf", "report-02.pdf", etc.

Click the Auto button. Enter the page count and the page numbering details. If you are scanning a double-sided document in two passes, you can number the pages 1,3,5... on the first pass and 2,4,6... on the second.

----------------------------

Networked HP Scanners: To use a networked HP unit, PeasyScan needs to know the scanner's URI. And the URI must be stored in a configuration file.
Update: Recent versions of the HPLIP print/scan driver can now auto-detect a networked scanning device.

Note the format of the sample URI line above. It contains the prefix "hpaio:/net/", the unit's model name, "?ip=" and its IP address. To identify the unit's model name, temporarily connect it via USB and run the command "scanimage -L".

You can also define a networked HP scanner using a hostname :

Code: Select all

export URI="hpaio:/net/ENVY_4500_series?hostname=Envy"
Then add a line to the file /etc/hosts using the printer's current IP address:

Code: Select all

aaa.bbb.cc.dd Envy
----------------------

PeasyScan will launch much faster if you can provide your scanner's URI in a configuration file. It saves PeasyScan the trouble of searching for your unit. For example:

Code: Select all

export URI="pixma:04A9173A_E0D343"
or

Code: Select all

export URI="epkowa:net:192.168.2.15"
But be aware that some device names are based on the scanner's USB ID numbers, which may change as you add/remove USB devices from your system.

--------------------------
Attachments
peasyscan-2.13.pet
Updated 2018-02-02
Optional compression when saving to PDF
(48.42 KiB) Downloaded 834 times
snappie.png
(12 KiB) Downloaded 2803 times
Last edited by rcrsn51 on Mon 01 Jun 2020, 11:54, edited 182 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

Here is a basic recipe for using Peasyscan:

1. Select the image format
2. Select the name of the scanned image file (the default folder for saved images is /root)
3. Click Start
4. Select the scan mode and resolution
5. Click Preview
6. Click Acquire Preview
7. Select all or part of the document
8. Click Scan
9. Click Return
10. Click Save
11. Click Quit

If you start getting a "Nothing was scanned" message, click the Reset button on the main screen.
Last edited by rcrsn51 on Mon 14 Oct 2013, 03:01, edited 6 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

[Updated]
Last edited by rcrsn51 on Sat 27 Nov 2010, 13:40, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

[Deleted]
Last edited by rcrsn51 on Mon 28 May 2012, 11:24, edited 4 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

[Deleted]
Last edited by rcrsn51 on Wed 31 Dec 2014, 17:50, edited 1 time in total.

tubby
Posts: 317
Joined: Sat 24 Jan 2009, 15:49

#6 Post by tubby »

And here is another one i posted some time ago.

http://murga-linux.com/puppy/viewtopic.php?t=59298

Laie
Posts: 318
Joined: Sun 20 Jan 2008, 18:42
Location: Germany

#7 Post by Laie »

Is there an Optical Character Recognition program for puppy?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

Tesseract is the best OCR engine.
http://murga-linux.com/puppy/viewtopic.php?t=234066
I also posted some other scripts and things there that you might find useful.

Auriza also posted Tesseract 2.04 at http://murga-linux.com/puppy/viewtopic.php?t=51507
I don't know whether that package was compiled with or without libtiff.

It is really about time I packaged Tesseract 3 and the latest ocropus...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

Peasyscan 1.3 now has OCR capability using Tesseract. Here is a download link for Tesseract 3.00. Click the small green DOWNLOAD box.

http://www.mediafire.com/file/kni6tgaan ... o-3.00.tar

The package contains two PETs - the Tesseract program and the English language data.

Update: The Tesseract-OCR project has moved from Google Code to GitHub and the v3.00 non-English language files have disappeared. But you can still get them (for now) through a manual procedure.

1. Go here and locate the file xxx.traineddata.gz where xxx is your 3-letter language code - deu, fra, ita, kor, rus, spa, ukr, etc.

2. Download the file and extract it.

3. Copy the file xxx.traineddata to /usr/share/tessdata

4. For other languages, you will need an upgrade to v3.04.

--------------------

Here is a little tool named pic2txt. It uses Tesseract OCR to convert graphic files (JPG, PNG, TIF, PNM) to text. Run it from the Graphic menu.

If your graphic is complicated or low quality, you can sometimes improve the OCR by up-scaling the image. You can now do this from inside pic2txt by installing image-changer.

------------------------------

Update: For a batch-mode version of pic2txt, read here.

------------------------------
Attachments
screenie.png
(12.52 KiB) Downloaded 4203 times
pic2txt-1.3.pet
Updated 2017-11-14
Better search for tesseract language files
Does upscaling through image-changer
(2.25 KiB) Downloaded 1105 times
Last edited by rcrsn51 on Tue 14 Nov 2017, 20:27, edited 53 times in total.

cryder
Posts: 1
Joined: Thu 04 Nov 2010, 15:08

#10 Post by cryder »

Yay, finally :)

Thanks for the link, I've been waiting for quite some time to give Tesseract a shot.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

Peasyscan 1.3

#11 Post by Béèm »

I don't know if this is the correct place to report problems, but here I go.
My printer is an Epson Stylus Photo RX600
I use Lucid 511.
I can scan with xsane.

With peasy, I get the panel to change color and to preview or scan.
The title bar indicates my scanner device.
I get an error on preview that nothing is scanned.

Thus I tried via the console:

Code: Select all

# peasyscan
/usr/local/peasyscan/scan: line 3: 19721 Segmentation fault      $PEASYPATH/xscanimage-peasy 2>/dev/null
pnmtopng: Error reading magic number from Netpbm image stream.  Most often, this means your input file is empty.
# 

Code: Select all

# cd /usr/local/peasyscan
# ./xscanimage-peasy
Segmentation fault
#
Looks I have a segmentation fault.
How to go from here?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

Which scanner driver, if any, did you install? Are you using the epkowa backend from here or are you using one of the built-in Epson backends that comes with Sane?
Last edited by rcrsn51 on Wed 14 Sep 2011, 22:35, edited 3 times in total.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#13 Post by Béèm »

I didn't install anything extra, so I suppose the one of xsane in Lucid 511 is used. I will have to check on the other machine with the scanner.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#14 Post by rcrsn51 »

In that case, could you please install the epkowa backend from the above link? It's the epkowa-2.26.0.pet at the end of the thread. Then try Peasyscan again.

You may need to go into the file /etc/sane.d/dll.conf and comment out the epson and epson2 entries.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

[SOLVED]

#15 Post by Béèm »

Indeed I got the epson2:libusb:001:003
The epkowa pet is installed and I have the choice no between the epson and the epkowa.
I can scan now, but there must be e temp file created somewhere as my save file is almost 0 now.

I saw in the same thread the iscan pet and remember now we had a discussion about it.

Thanks for the help.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

If you comment out the epson and epson2 entries in /etc/sane.d/dll.conf, you should just get the epkowa driver.

Peasyscan generates some large, temporary PNM image files in /root. They are deleted when the program terminates. Maybe they should be placed elsewhere.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#17 Post by Béèm »

Yes thanks, I remember that now from our previous discussion.
Maybe that pnm file should be put in /tmp.
When scanning in color it can grow a lot.

Even resizing the scan area did work.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#18 Post by rcrsn51 »

Thanks for taking the time to test this.

Peasyscan has now been tested successfully with five major scanner manufacturers - HP, Canon, Epson, Lexmark and Brother. I am still looking for test results on some of the lesser-known brands.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#19 Post by rcrsn51 »

Peasyscan has been updated to v1.3.1 to fix a problem with overlapping windows.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

On the user interface

#20 Post by shinobar »

Great work, rcrsn51!
Your peasyscan is much smaller than Xsane and promising.
I have some requests to brash up the user interface,

1. Working directory
Your peasyscan uses /root directory as the working directory.
Can we choose the working directory under /mnt/home or somewhere?
Or, we can set the working directory at the same directory of the final save place.
Why not /tmp as the default working directory?
Sometime the work files were left at /root. It they are under the /tmp, they will be erased at shutdown.

2. Default saving image file name
I suppose it will be convenient if the image file name is preset, like '/root/my-documents/clipart' or somewhere.
Keeping the last used file name is more nice.

3. Control window hierarchy
What i am confused is the hierarchy of the GUI windows.
The first window has 4 buttons, Reset/Scan/Save/Quit.
The second window has 3 buttons, Preview/Scan/Done.

The first 'Quit' button only closes the first window but the second windows remains.

Click the first 'Scan', then click the second 'Scan', and back to the first, click 'Save', ok saved.
Click the second 'Done' and click the first 'Quit', ok all closed.
Somewhat wired...

CAN WE MAKE THE TWO IN ONE WINDOW like as the attached?

4. 'Done' button and showing image
Click the first 'Scan', then click the second 'Scan', and click the second 'Done', then the image is shown.
If this is for checking the scan, it is strange because the second window is already closed.
I need to back the first window and click 'Scan' to restart the second window.
The 'exit' at the menu bar of the second window seems the same as the 'Done' button.

Small thing: you are converting .pnm into .png to show, but you need not to do so. The viewnior can display .pnm files.

Please consider for the future version.
Hope you keeping the great job.
Attachments
peasy_gui.png
Can the first save window be integrated in the second scan window?
(7.6 KiB) Downloaded 1642 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

Post Reply