


You can make full text searches now or select text areas.įor some pdf files, pdfsandwich produces much larger files after OCR processing. This will generate a file alice_ocr.pdf which looks like the orginal file, but the recognized text will be placed behind the scanned images. If you have a scanned pdf file, for instance this one: alice.pdf (which is the first chapter of a novel you might have heard of), invoke pdfsandwich like this: If OCaml is installed on your system, you can compile and install as follows: Svn checkout svn://.net/p/pdfsandwich/code/trunk/src pdfsandwich
#Ubuntu install pdfinfo download
tar.bz2 package from the download area on the project website or check them out by subversion:
#Ubuntu install pdfinfo software
Pdfsandwich is open source software (license: GPL). Ports are available for FreeBSD and OpenBSD. Pdfsandwich is available through Homebrew. An (incomplete) list of pdfsandwich ports can be found on. Several other Linux distributions ship pdfsandwich through their standard repositories, such as Arch or Gentoo. Sudo dpkg -i pdfsandwich_0.1.7_b # If there are error messages due to missing dependencies, ignore them and proceed. pdfsandwich_0.1.7_b to some local directory, and either use your preferred graphical package manager or execute the following commands in this directory: If you prefer to install the latest version, download the respective deb file, e.g. Independent of this, I maintain pdfsandwich deb packages which are available for Download on the project website. Download and Installation Linux Debian/Ubuntuĭebian and Ubuntu provide pdfsandwich through their standard repositories, although not always the latest versions. Since version 0.0.5 pdfsandwich uses tesseract instead of cuneiform for OCR. Since version 0.0.9 pdfsandwich optionally preprocesses scanned pdfs by unpaper. Ghostscript is now optional only needed for resizing pdf pages, if the respective command line option is given. Since version 0.1.5 pdfsandwich uses pdfinfo and pdfunite instead of ghostscript for most operations. Note: If you use Tesseract 4 or later, it is highly recommended to use pdfsandwich 0.1.7 or later, as Tesseract may freeze when called in multiple threads. For optimally scanned pdf files, this can be switched off by option -nopreproc to speed up processing. For instance, slightly rotated pages are automatically straightened and dark edges removed. By default, pdfsandwich runs unpaper to enhance the readability of scanned pages and to improve OCR. While pdfsandwich works with any version of tesseract from version 3.0 on, tesseract 3.03 or later is recommended for best performance. It supports parallel processing on multiprocessor systems. It is known to run on Unix systems and has been tested on Linux and MacOS X. It is able to recognize the page layout even for multicolumn text.Įssentially, pdfsandwich is a wrapper script which calls the following binaries: unpaper (since version 0.0.9), convert, gs, hocr2pdf (for tesseract prior to version 3.03), and tesseract. Pdfsandwich is a command line tool which is supposed to be useful to OCR scanned books or journals. pdf files which contain only images (no text) will be processed by optical character recognition (OCR) and the text will be added to each page invisibly "behind" the images. Pdfsandwich generates "sandwich" OCR pdf files, i.e. For anyone wanting to take a 1 or 2 pg pdf and turn it into a pdf with 2 copies of that side-by-side in landscape view ( great for printing flyers), see my answer here.Pdfsandwich pdfsandwich: A tool to make "sandwich" OCR pdf files.Super User: another answer to "How to convert a 1 page PDF to a 2 page per sheet PDF?" (and see comments underneath).Super User: one answer to "How to convert a 1 page PDF to a 2 page per sheet PDF?" (and see comments underneath).The -sufix '2x2' part simply says to add 2x2 as a suffix to the output file name, for easier recognition of which files it just generated. You can do multiple pdfs as a batch like this (this example is taken from the man page: man pdfnup): pdfnup -nup 2x2 -suffix '2x2' -batch myfile1.pdf myfile2.pdf See man pdfnup for a few more details: pdfnup -nup 2x1 mypdf.pdf This creates a pdf with 2 pages side-by-side per sheet on a landscape view, to be printed flipped over the short edge. Install pdfnup on Ubuntu with: sudo apt install texlive-extra-utils It allows you to pack multiple sheets on 1. For some cases you may want to use pdfnup instead.
