1

Here is my use case: A multipage document is scanned and mailed in hardcopy to be signed. The last page with the signatures is signed, scanned somewhere else and then mailed back to me. I want to scan the signed page, and then replace the unsigned last page in the document with the new signed version of that page, WITHOUT rescanning the entire document, and then using xsane's multipage document feature to save the new version

But no matter what I try, XSane seems to persist its view of what the document is in some mysterious place, and even though there is a directory containing all the files properly numbered and a xsane-multipage-list file correctly listing all the files, it seems that XSane retains its view of what pages are contained in the multipage file and will not produce the pdf I expect it to. Is there some metadata preserved in the .pnm files themselves that prevents this from working?

This is the xsane-multipage-list file I am using

Project changed@@@@@@@@@@@@@@@@
image-0001.pnm
image-0002.pnm
image-0003.pnm
image-0004.pnm
image-0005.pnm
image-0006.pnm
xsane-multipage-list

All of the files listed are present in the directory where this file lives. The name of this directory is the name of the XSane "project" I'm trying to save.

Of course, I realize that I could avoid this hassle and just rescan the document with the page I want, but I am the sort who would rather waste time trying to understand this than "just getting the job done."

What is going on here? It doesn't make sense to me. Thanks.

1 Answers1

1

Xsane can be a bit... Bad. And old. And uncomfortable to use. And buggy. And overall, not good. I'll chalk up the behavior you're observing to a software bug.

Personally, I really only use it for scanning, not for document management. When possible, I use paperwork-gtk instead, though that also has more bugs than I like, but at least isn't as hard to use.

I'd just use mutool/pdftool (same tool, different names) to selectively join your scanned PDFs (pnm... Uh. That's an image file format so wasteful I would honestly avoid it, but no, pnm has no metadata).

mutool draw -o final.pdf unsigned_document.pdf 1-19 signature_scan.pdf

(Assuming the original unsigned document PDF had 20 pages)

  • "Xsane can be a bit... Bad. And old. And uncomfortable to use. And buggy. And overall, not good. " Why don't you tell me what you really think of it? :-) I will have a look at the alternatives you suggest. – Steve Cohen Jan 07 '23 at 17:31
  • 1
    I could try to tell you, but the words I could find would be sub-optimal, not fully suited for the job, leave room for improvement, underperforming and not doing very well at describing what I mean. – Marcus Müller Jan 07 '23 at 17:41
  • You may not know this but "why don't you tell me what you really think?" is a semi-humorous retort common in the USA to someone who has delivered a "rant" - whether that rant is justified or not. I believe your "rant" WAS justified - and funny. – Steve Cohen Jan 07 '23 at 17:44
  • 1
    @SteveCohen I fully got that ;) And thanks for playing along :) – Marcus Müller Jan 07 '23 at 17:47
  • mutool is the real deal. Thanks. – Steve Cohen Jan 07 '23 at 18:04