Scanning: Difference between revisions

From Bibliotheca Anonoma
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


== PDF Command Line Modification ==
== PDF Command Line Modification ==
=== PDFTK ===
You can [https://copr.fedorainfracloud.org/coprs/robert/pdftk/ get pdftk working with CentOS 7 using this Copr repo.] or this [https://www.linuxglobal.com/pdftk-works-on-centos-7/ rpm] or [https://www.linuxglobal.com/static/blog/pdftk.spec spec] for Fedora, and the package [http://installion.co.uk/ubuntu/xenial/universe/p/pdftk/install/index.html Ubuntu 16.04.]
Merge an odd page pdf with an even page pdf (just like pdftk shuffle): https://www.pdflabs.com/blog/how-to-collate-even-odd-scanned-pages/
=== QPDF ===


Since PDFTK is no longer supported in most new versions of Linux (since [https://github.com/documentcloud/docsplit/issues/123 GCJ, GNU Java Compiler is abandoned]), you must use QPDF.  
Since PDFTK is no longer supported in most new versions of Linux (since [https://github.com/documentcloud/docsplit/issues/123 GCJ, GNU Java Compiler is abandoned]), you must use QPDF.  
(Though you can [https://copr.fedorainfracloud.org/coprs/robert/pdftk/ get pdftk working with CentOS 7 using this Copr repo.], and [http://installion.co.uk/ubuntu/xenial/universe/p/pdftk/install/index.html Ubuntu 16.04.])


This is what you do to reverse page order of a PDF, useful for PDF scans.
This is what you do to reverse page order of a PDF, useful for PDF scans.
Line 13: Line 19:
Merge two pdfs into one: https://github.com/qpdf/qpdf/issues/11
Merge two pdfs into one: https://github.com/qpdf/qpdf/issues/11


Merge an odd page pdf with an even page pdf (just like pdftk shuffle):
=== Sources ===
 
https://github.com/documentcloud/docsplit/issues/123


== DIY Book Scanner ==
== DIY Book Scanner ==

Latest revision as of 03:31, 7 February 2017

Leleahcimjconstruction.gif

Stub

This page is a stub. You can help by expanding it.

PDF Command Line Modification[edit]

PDFTK[edit]

You can get pdftk working with CentOS 7 using this Copr repo. or this rpm or spec for Fedora, and the package Ubuntu 16.04.

Merge an odd page pdf with an even page pdf (just like pdftk shuffle): https://www.pdflabs.com/blog/how-to-collate-even-odd-scanned-pages/

QPDF[edit]

Since PDFTK is no longer supported in most new versions of Linux (since GCJ, GNU Java Compiler is abandoned), you must use QPDF.

This is what you do to reverse page order of a PDF, useful for PDF scans.

https://inconsolation.wordpress.com/2014/03/24/qpdf-still-more-pdf-wizardry/

Merge two pdfs into one: https://github.com/qpdf/qpdf/issues/11

Sources[edit]

https://github.com/documentcloud/docsplit/issues/123

DIY Book Scanner[edit]

Dual Cameras: Software Trigger[edit]

Dual cameras: Hardware Trigger[edit]

When you use a hardware trigger, all the even pages will be on one camera and the odd pages will be on the other. In order to merge them together, you must first check that all the pages are accounted for, then rename them to odd or even.

These two bash scripts (Mac/Linux) can be used to do the renaming. After you rename, you just move them to one folder for scantailor to process.

odd.sh
#!/bin/bash 
#
num=1
for file in *.tiff; do
        mv "$file" "$(printf "%04u" $num).tiff"
        let num=num+2
done
even.sh
#!/bin/bash 
#
num=2
for file in *.tiff; do
        mv "$file" "$(printf "%04u" $num).tiff"
        let num=num+2
done

Scantailor[edit]

Finally, after the odd and even pages are collated into one folder, you're ready to use Scantailor. (Can be found in Debian and Fedora repos)

http://scantailor.org/

Notice that Scantailor outputs to .tif in the out/ folder. You will need to use tiffcp to combine them, and tiff2pdf to turn it into an actual pdf file.

http://www.moreno.marzolla.name/software/scan-to-pdf/