James R. Barlow
7b3d7ca92a
ghostscript: choco doesn't put Ghostscript on PATH anymore
...
It seems that chocolately doesn't put gswin[32,64]c on PATH anymore,
so compensate.
2021-11-13 01:18:12 -08:00
James R. Barlow
e3126d2806
Adjust test to support Tesseract 5 working harder to find its files
2021-11-13 01:16:35 -08:00
James R. Barlow
6f58a14351
pdfa: remove deprecated pkg_resources based access and tests
2021-11-13 00:52:03 -08:00
James R. Barlow
7ba04267b1
Remove shims to support for old versions of pikepdf < 4
2021-11-13 00:43:20 -08:00
James R. Barlow
698e8791d7
Remove Python 3.6 specific unicode environment checks
2021-11-13 00:28:52 -08:00
James R. Barlow
380b981763
Remove most Python 3.6 special casing
2021-11-13 00:27:48 -08:00
James R. Barlow
5abfb14c2a
Remove leptonica and cffi
2021-11-13 00:06:35 -08:00
James R. Barlow
59642a98b2
Disable --remove-background so we can remove leptonica
2021-11-12 23:56:52 -08:00
James R. Barlow
42bf5476dd
optimize: replace leptonica compdata with direct insert of JPEG
...
Confirmed that img2pdf just inserts JPEG verbatim. Never had to go through
the trouble we did.
2021-11-12 23:20:49 -08:00
James R. Barlow
30440104ba
Remove --threshold argument
...
Tesseract is now included better thresholding (binarization) in v5. Users that have
thresholding issues should try that first. If we find further problems
this can be brought back as a plugin.
2021-11-12 20:09:55 -08:00
James R. Barlow
b159e02110
Convert deskew to use degrees, since all our other angles are in degrees
2021-11-12 16:40:51 -08:00
James R. Barlow
a55ab05d16
Replace leptonica deskew with tesseract find skew and pillow rotate
...
Also rebuild the cache.
2021-11-12 16:35:08 -08:00
James R. Barlow
25d046ae95
Modernize OrientationConfidence definition
2021-11-10 00:55:23 -08:00
James R. Barlow
01b0f76e36
Remove duplicate definition of OrientationConfidence
2021-11-10 00:55:07 -08:00
James R. Barlow
6c34d59836
tesseract: yet another version variant
2021-11-04 00:17:18 -07:00
James R. Barlow
386453d178
pdfa: replace read_binary() with files()
2021-10-31 02:01:11 -07:00
James R. Barlow
615a7561b5
tesseract: tidy some uses of str paths instead of Path
2021-10-31 02:01:05 -07:00
James R. Barlow
c4c64c3ea0
pre-commit updates
2021-10-31 01:31:57 -07:00
James R. Barlow
21279f5784
Fix leaked file handle for output_type none
2021-10-28 02:50:17 -07:00
James R. Barlow
a63a21a7fc
helpers: remove shim for unsupported old version of pikepdf
2021-10-28 02:46:34 -07:00
James R. Barlow
1c4d5d79f7
Improve some error messages
2021-10-28 01:16:22 -07:00
James R. Barlow
690f88119d
Fix test failures on pikepdf 3.2.0 + pybind11 2.8.0
...
When compiled without pybind11 2.8.0, pikepdf supplies a shim to implement
pikepdf._ObjectMapping.values() which has subtly different semantics
from a true dict-like objects; in particular it supports
next(objectmap.values())
where a standard dict requires
next(iter(objectmap.values()).
pybind11 2.8.0 now implements .values() properly, meaning some misuses of
protocol in ocrmypdf fail.
If pybind11 < 2.8.0, pikepdf will
continue to offer its shim. If pybind11 >= 2.8.0, pikepdf does not add its shim.
Consequently no changes were needed in pikepdf.
Closes #843
2021-10-12 13:38:52 -07:00
James R. Barlow
78f391536b
Offer hint to user to use --max-image-mpixels after decompression bob error
...
Closes #801
2021-10-06 00:19:11 -07:00
fedeliallalinea and GitHub
af18bc0684
fixs importlib.{metadata,resource} for new python version ( #840 )
...
Signed-off-by: Marco Genasci <fedeliallalinea@gmail.com >
2021-10-03 23:30:11 -07:00
James R. Barlow
790d3022f6
Implement --output-type=none to skip producing the PDF and use only the sidecar
...
Closes #787
2021-09-26 01:07:34 -07:00
James R. Barlow
ec311af796
typing: subprocess
2021-09-22 17:18:59 -07:00
James R. Barlow
c725bf79da
flake8 delinting
2021-09-21 16:37:03 -07:00
James R. Barlow
9559f76fae
optimize: fix typo in debug msg
2021-09-19 16:31:00 -07:00
James R. Barlow
45736b7c2b
cli: clarify text to more accurately describe behavior of --jbig2-lossy
2021-09-16 16:03:39 -07:00
James R. Barlow
79fd8d01a5
info: fix incorrect handling of inline images and other typing fixes
2021-09-15 00:26:15 -07:00
James R. Barlow
79fe7a0a85
graft: remove separate implementation of unparse_content_stream
2021-09-15 00:25:06 -07:00
James R. Barlow
b4b32a35b5
optimize: fix typing consistency
2021-09-15 00:09:08 -07:00
James R. Barlow
f5053158d4
hocrtransform: fix regression causing hocr text to be not rendered
...
Fixes #828
2021-09-14 17:23:09 -07:00
James R. Barlow
4d67812d51
importlib helpers don't provide importlib.thing, but importlib_thing
...
Fix everywhere.
2021-09-14 00:15:07 -07:00
James R. Barlow
cc6e9cecc0
Replace pkg_resources version lookup with importlib.metadata
2021-09-13 01:10:49 -07:00
James R. Barlow
208657f840
pdfa: replace pkg_resources with importlib.resources
2021-09-13 01:10:49 -07:00
James R. Barlow
c28858a099
leptonica: fix a PyPy-specific error
...
Error is:
TypeError: from_buffer() got a 'memoryview' object, which supports the buffer interface but cannot be rendered as a plain raw address on PyPy
PyPy is happy to access a bytes() copy of the memoryview.
2021-08-31 02:31:58 -07:00
James R. Barlow
4e4f0bfa1f
graft: use faster unparse_content_stream if available
2021-08-31 02:16:25 -07:00
James R. Barlow
b91096c615
hoctransform: fix deprecation warning
2021-08-28 02:11:33 -07:00
James R. Barlow
95d9e8d91a
info: inconsistent types used in ContentsInfo.name_index
...
This broke PyPy but CPython is fine with it.
2021-08-28 00:18:14 -07:00
James R. Barlow
cb6c1939e9
typing: fix runtime issues
2021-08-27 02:18:54 -07:00
James R. Barlow
3764ee872a
typing: refactor namedtuples in info
2021-08-27 00:51:11 -07:00
James R. Barlow
e402d5cb4b
typing: fix path and numeric issues
2021-08-27 00:23:38 -07:00
James R. Barlow
53cd04799a
typing: fix Pillow usage, leptonica
2021-08-27 00:06:38 -07:00
James R. Barlow
f2545d4496
typing: remove deprecated abstractstaticmethod
2021-08-26 23:51:11 -07:00
James R. Barlow
9b81e76ed4
typing: fix issues; avoid some magic literals
2021-08-26 23:48:27 -07:00
James R. Barlow
0956fc81aa
typing: improvements for concurrency files
2021-08-26 23:47:53 -07:00
James R. Barlow
72279e7759
typing: confirmed that _pages_from_ranges(not-str) is never used
2021-08-26 23:47:11 -07:00
James R. Barlow
6f9b948064
typing: fix some trivial issues
2021-08-26 23:46:44 -07:00
James R. Barlow
4eca0a165b
pre-commit: pyupgrade modernizing
2021-08-26 18:04:38 -07:00