Scan an image to PDF

Is there an application in Linux that allows one to import a document from a scanner & save as .pdf file?

Also, import → scan & → save as a .jpeg image?

Scanner is CanoScan LiDE20.

I am an KDE user and use Kooka for scanning. Do not know if it works with your CanoScan LiDE20.

I use gnome; is there a similar program in gnome? Is ‘kooka’ an image or a PDF program?

Also (in general), can KDE programs work on gnome?

On Mon, 18 Aug 2008 18:46:03 GMT
zmdmw52 <zmdmw52@no-mx.forums.opensuse.org> wrote:

>
> I use gnome; is there a similar program in gnome? Is ‘kooka’ an image or
> a PDF program?
>
> Also (in general), can KDE programs work on gnome?
>
>

Kooka is a scan program. it produces images.

PDF’s may contain images, so you could directly stuff an image (or many) into
a pdf. You won’t be able to do word searching.

I assume you want pdf’s like you might get from openoffice or so… this
requires you to perform OCR (Optical Character Recognition) on the image, to
produce the text, to produce the pdf.

Kooka DOES support performing OCR on images scanned when an OCR package is
also installed. Your results will vary, since OCR depends heavily on clarity
of scan, dpi, type of font, font kerning, dictionary used… and so on.

There are two OCR packages available through YaST/zypper, gocr and ocrad.
I’ve played with them a bit, they’re very functional and do produce good
output, and with practice, you can produce (almost) reliable recognition
from scans of documents.

There is also an OCR application (tesseract) which was released into the open
source community some time recently (well, somewhere early 2007 I think).
Ranks highly on OCR testing. I’ve not found time to play with it yet, but it
certainly looks nice. (dang, now I’m going to have to download it and play)

Home page:
http://code.google.com/p/tesseract-ocr/

Readme page:
http://code.google.com/p/tesseract-ocr/wiki/ReadMe

Hope this helps

Loni


L R Nix
lornix@lornix.com

Kooka saves its initial scans to its own Gallery.

You then have a choice of formats in which to save the scan to another location including .jpg.

If you open the .jpg image in most KDE programs, there is an option to print to PDF.

I haven’t found either of the OCR programs that Kooka has used particularly good. Perhaps they have improved recently.

For your first questions: see the posts above.

For your last question: Yes, just install it with YaST. YaST might add some KDE libraries as dependencies. But you could also look for a scanning program belonging to the GNOME family. I suppose you can search in the GNOME website as good as I, so I leave that to you.

For your first questions: see the posts above.
I meant a program similar to Adobe Acrobat (not Adobe Reader), where there is Menu Option for File –> Create PDF –> From Scanner, it need not have the exact same menu but a feature to scan from within the program to generate the PDF (as one does in Adobe Acrobat ver. 6 & above).

I added the KDE libraries & also selected the KDE desktop during installation. But can’t run any of the KDE applications (all beginning with ‘k’), from the gnome desktop (Session - gnome, while logging in).

What do you mean by ‘can’t run’? All problems are defined by three things:

  1. What did you do (exactly)
  2. What did you think that would happen
  3. What (exactly ) happened

Every assumption that the listener/reader will by default understand things is a source of misunderstanding.

Now I do not use GNOME, but I suppose that you can start simple commands within GNOME. In KDE you use e.g. Alt-F2, a window pops up where you type your command. But when things go wrong you can also use a console to type the command in and you will see all errors, etc. when it goes wrong.

Command could be /opt/kde3/bin/kooka . So what did you do and what happened instead of can’t (keyboard broken?).

Here is a simple bash script that will do the job

#!/bin/bash

# Scan to PDF from the command line
# Loops for convenience
# Asks for a destination folder
# Will scan several images to 1 pdf


# Ask for output folder
FLDR='/home/julian/Documents'

#FMT='pnm'
FMT='tiff'
MODE='' #--mode Lineart|Gray|Color
NOW="`date +%Y%m%d-%H%M%S`"
FILE="$FLDR/scan-$NOW.$FMT"
WAIT='--wait-for-button=yes'
echo 'Press button on scanner to start'
scanimage --format=$FMT --progress $WAIT $MODE >$FILE
echo "Output is in $FILE"

#echo ' '
#echo 'OCRing'
#gocr $FILE >$FLDR/scan-$NOW.txt
##ocrad $FILE >$FLDR/scan-$NOW.txt
#echo "OCR Finished, see $FLDR/scan-$NOW.txt"

echo ' '
echo 'Converting to PDF ()'
tiff2pdf -p A4 -c "Julian Knight" $FILE >$FLDR/scan-$NOW.pdf

Though I normally use VueScan which is a cross platform pro scanning solution (originally aimed at slide scanners). It is not free though I’m afraid but it does work with both KDE and Gnome (as well as MS Windows). It is superb and produces great results though it does take a little getting used to (it helps if you know a bit about the technicalities of scanning).

The script requires tiff2pdf and scanimage which are probably installed. It assumes that you have already configured the scanner.

Regards,

On Tue, 19 Aug 2008 15:56:04 GMT
zmdmw52 <zmdmw52@no-mx.forums.opensuse.org> wrote:

>
> > For your first questions: see the posts above.
> I meant a program similar to Adobe Acrobat (not_Adobe_Reader), where
> there is Menu Option for File → Create PDF → From Scanner, it
> need not have the exact same menu but a feature to scan from within the
> program to generate the PDF (as one does in Adobe Acrobat ver. 6 &
> above).

Kooka might have the menu option to dump directly as a pdf… don’t know,
haven’t used it in a while now. You could always install kooka, try it
out… if it doesn’t work, uninstall it… that’s usually how I test things
out.

Try the other scanning programs included with opensuse… maybe one of them
can satify your needs. Uninstall any that don’t. Pretty simple.

> hcvv;1858888 Wrote:
> > For your last question: Yes, just install it with YaST. YaST might add
> > some KDE libraries as dependencies. But you could also look for a
> > scanning program belonging to the GNOME family. I suppose you can
> > search in the GNOME website as good as I, so I leave that to you.
> I added the KDE libraries & also selected the KDE desktop during
> installation. But can’t run any of the KDE applications (all beginning
> with ‘k’).

No idea. Generally, everything works everywhere… you can run Gnome and KDE
programs in Xfce too… Yast will handle including the needed libraries to
run a program.

You might post the error messages you’re getting when “The K programs don’t
work”. That would help us help you resolve this problem.

Loni


L R Nix
lornix@lornix.com

For some reason from the gnome desktop (Applications Tab), the KDE programs would not run. After an update, they do work (tried kedit, Dolphin, Konquerer; …others should also work fine).

  1. (Double-) Clicked on the app.
  2. The particular app. would open a window/run.
  3. Nothing

Now KDE-applications do work, after update (may have been a ‘dependency issue’).

Nice you got that solved, hope you can get back to finding a solution to your original problem. :slight_smile: