Compare commits

...
3 Commits
Author SHA1 Message Date
James R. Barlow aa394440db Just use the PyPI version of ocrmypdf in dockerfile
Apparently setuptools_scm_git_archive is ineffective on hub.docker.com
automatic build, it still can't find a version.
2016-02-17 15:14:23 -08:00
James R. Barlow 3b98a1a04b Fix KeyError on unexpected tess output 2016-02-17 06:05:27 -08:00
James R. Barlow fcb89b0c58 Forgot to save release notes 2016-02-17 01:48:25 -08:00
3 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -63,9 +63,11 @@ RUN chmod 644 /usr/share/tesseract-ocr/tessdata/pdf.ttf
# Install application and dependencies
# In this arrangement Pillow and reportlab will be provided by the system
# Even though ocrmypdf is locally present, pull from PyPI because
# Dockerhub and setuptools_scm clash
RUN . /appenv/bin/activate; \
pip install --upgrade pip \
&& pip install /application \
&& pip install ocrmypdf \
&& pip install --no-cache-dir -r /application/test_requirements.txt
# Remove the junk
+4 -4
View File
@@ -15,15 +15,15 @@ New features
- Automatic page rotation (``-r``) is now available. It uses ignores any prior rotation information
on PDFs and sets rotation based on the dominant orientation of detectable text. This feature is
fairly reliable but some false positives occur especially if there is not much text to work with. (#4)
- Deskewing is now performed using Leptonica instead of unpaper. Leptonica deskews images faster and
more reliably than unpaper.
- Deskewing is now performed using Leptonica instead of unpaper. Leptonica is faster and more reliable
at image deskewing than unpaper.
Fixes
-----
- Fixed an issue where lossless reconstruction could cause some pages to be appear incorrectly
rotated in the page had a /Rotate tag applied (#50)
if the page was rotated by the user in Acrobat after being scanned (specifically if it a /Rotate tag)
- Fixed an issue where lossless reconstruction could misalign the graphics layer with respect to
text layer if the page had been cropped such that its origin is not (0, 0) (#49)
@@ -31,7 +31,7 @@ Fixes
Changes
-------
- Logging output much is now better
- Logging output is now much easier to read
- ``--deskew`` is now performed by Leptonica instead of unpaper (#25)
- libffi is now required
- Some changes were made to the Docker and Travis build environments to support libffi
+2 -2
View File
@@ -107,8 +107,8 @@ def get_orientation(input_file, language: list, timeout: float, log):
osd[parts[0].strip()] = parts[1].strip()
oc = OrientationConfidence(
angle=int(osd['Orientation in degrees']),
confidence=float(osd['Orientation confidence']))
angle=int(osd.get('Orientation in degrees', 0)),
confidence=float(osd.get('Orientation confidence', 0)))
return oc