libksane seems to break QProcess::start calls

Tobias Leupold tl at l3u.de
Thu Mar 3 17:23:31 GMT 2022


Hi Klaas!

> Interesting, I wrote a very similar little utility called PDFQuirk:
> https://dragotin.github.io/quirksite/

Well, apparently, this is a quite common task to do ;-)

> PDFQuirk has a very similar idea, yet it does not use libksane, but the
> command line tool scanimage directly, started via QProcess. The idea
> behind that is that the users should not need to tweak around with
> scanner settings after the 'admin' set them, as in the average office,
> the scanner does not change so often...

I also thought about using scanimage (actually, scandoc is the GUI version of 
a shell script I used until now). But being able to set the scanner settings 
via the GUI (esp. the page size) seemed nicer to me. Once set, the settings 
are saved and restored per scanner, so that one only has to set them once, 
too.

> As this only happens with one scanner and works fine with the other
> (right?),

Correct

> I would point to the scanner driver that is loaded by sane.
> Have you tried the scanimage command line utility from SANE if it works
> with the scanner in question?

Using scanimage on the console works without a problem.

The thing I really don't get is how scanning two images can ever affect a 
QProcess started somewhere else ... I mean the convert process does work, but 
QProcess thinks that it doesn't finish ... but only after two scans ...




More information about the kde-devel mailing list