It is currently Tue Jul 02, 2024 3:35 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Scan multiple documents gimp, gmic, gscan2pdf
PostPosted: Mon May 03, 2021 10:26 pm  (#1) 
Offline
GimpChat Member

Joined: Nov 08, 2016
Posts: 45
Bottom line I want to scan multiple text documents (ADF) into separate pdf files, with a little cleanup in the middle. The cleanup is basically some stray pixels and crisper text.

I tried gimp's plugin xsane. I did select ADF and all pages were scanned, but in the GUI there was only one tab or one image with one layer. I expected to see multiple tabs/images or layers. I'd prefer tabs/images.

(1) Anyone know what I did wrong?

I ended up using gscan2pdf. I would like to run gmic on the images before saving to pdfs. This I could do in a bash script. Here's is what I tried:

Quote:
gmic -input test.jpg -jeje_scandoc 1,10,90,5,0 -output test-out.jpg
gmic test.jpg jeje_scandoc 1,10,90,5,0 -output test-out.jpg
gmic test.jpg jeje_scandoc 1,10,90,5,0 test-out.jpg

The first two commands above worked, but I don't have a handle on gmic syntax yet (i.e., what needs to be quoted). You don't need the -input and -output. You can totally remove -input and it still works. It isn't the case with -output, but I think if I had quotes right it would work.

(2) Can anyone comment on commandline gmic and quoting, and get the 3rd command to work.

I also saw a gmic option -gui_split_preview. I envisioned this to look like the window displayed if a user opened the gimp gmic plugin. But again I would be doing this in a bash script. Something like:

Quote:
gmic -gui_split_preview -input test.jpg -jeje_scandoc 1,10,90,5,0 -output test-out.jpg

But the above does not work.

(3) Does anyone know how to use gmic's -gui_split_preview?

I might not need the bash script, I see gscan2pdf under Preferences > General options allows the user to add tools. If I can get the above gmic commands to work, I thought I'd try adding them to gscan2pdf.

I've been googling, reading, and trying gmic's tutorial, but I've hit a wall.

(4) Any help, pointers, tips, or suggestions would be appreciated.

Thank you.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Scan multiple documents gimp, gmic, gscan2pdf
PostPosted: Tue May 04, 2021 5:00 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
XSane batch does work but limited as to file type - PDF or multipage tiff and big file size.

Quote:
I've been googling, reading, and trying gmic's tutorial, but I've hit a wall.


The place to ask question about gmic is https://discuss.pixls.us/c/software/gmic/10

Quote:
(4) Any help, pointers, tips, or suggestions would be appreciated.


Take this with a pinch-of-salt, and since this is a Gimp forum, Gimp (and other stuff)
Take the test.jpg in Gimp and apply the gmic filter to determine good values. Top right corner is an icon to save the parameters (eg jeje_scandoc 3,10,90,5,0) to the clipboard.
For multiple images and using Gimp, BIMP will apply a gmic_gimp_qt command to files-on-disk, however it is slow to cycle through many images.
That gets a lot of corrected jpegs but for a small pdf size (Gimp makes terrible PDF's) linux commandline tiff2pdf using jpg compression gives a reasonable file size. (10th the size of a Gimp PDF).
tiff2pdf will convert a multi-page tiff, but I would keep in individual PDF pages and finally aggregate them into a single file.. I use PDFchain for this which has a GUI rather than command line pdftk.

_________________
Image


Top
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Many of my GEGL Filters are getting tutorial documents

4

No new posts Attachment(s) Remove only black spots in scanned documents?

4

No new posts Scan in and extract URLs using GIMP

8

No new posts MULTIPLE GIDES

3

No new posts Attachment(s) add multiple guides

5



* Login  



Powered by phpBB3 © phpBB Group