Sign inSign up

jmaslak/format-scan-pdf

By jmaslak

•Updated over 2 years ago

Fixes some problems in scanned PDF files.

Image
2

1.5K

jmaslak/format-scan-pdf repository overview

⁠What Is It

This is a console (terminal) application.

This Docker image is a text mode console application that will, through menus, allow you to "fix" broken PDF files. By broken, I mean files that may have quality issues (but are valid PDFs). For instance, the file may need the pages rotated, pages split into two pages (I.E. two pages of a book scanned into one page of a PDF), first and/or last pages removed from the PDF, pages "de-skewed" (I.E. text is at an angle that isn't a proper 90 degrees), and may need OCR (optical character recognition, to allow copy/highlighting/search) added.

It also has some basic redaction capability, where it will convert, if requested, the document to images and back to PDF, and remove many PDF tags from the output file. This is not industrial-grade redaction, but should help increase the chance that a PDF only contains what you want it to contain.

This is intended to be used on scanned images of printed text. Using it on anything else may give surprising and/or incorrect output.

⁠Usage

Create a directory for your PDF input and output files. I recommend ~/pdf, as everything will assume that from this point on.

Once that is done, you can convert PDFs with the following:

docker run -it --user $(id -u):$(id -g) -v ~/pdf:/usr/pdf jmaslak/format-scan-pdf in.pdf out.pdf

⁠Github

https://github.com/jmaslak/format-scan-pdf⁠

Tag summary

Content type

Image

Digest

sha256:59b03c2db…

Size

362.8 MB

Last updated

over 2 years ago

docker pull jmaslak/format-scan-pdf