James R. Barlow
58ec56180a
Add a few more type annotations to public APIs
2020-04-10 13:00:19 -07:00
James R. Barlow
23bc3d3a29
tests: workaround for Ghostscript 9.52 txtwrite problem
2020-03-29 22:45:16 -07:00
James R. Barlow
2490be8490
Fix debug.log not being deleted on Windows (probably)
...
Fixes #515
2020-03-29 21:53:56 -07:00
James R. Barlow
00498282f5
validation: blacklist Ghostscript 9.51 too
2020-03-24 21:27:18 -07:00
James R. Barlow
e4cc9fcba7
Wrong number of threads to use shown when OMP_THREAD_LIMIT is defined
2020-03-23 01:06:55 -07:00
James R. Barlow
a4555b1dae
Add halftone mask to leptonica
2020-03-18 23:09:39 -07:00
James R. Barlow
f35a2303bb
info.py: linearize O(n^2) search for use images on a page
2020-03-18 22:59:18 -07:00
James R. Barlow
9be533b5f4
watcher: allow all parameters to ocrmypdf.pdf to be passed by JSON
2020-03-15 21:45:51 -07:00
James R. Barlow
99653fcd32
optimize: consider ICCBased 1 bit for optimization
2020-03-15 02:20:44 -07:00
James R. Barlow
5442c97ed8
Consult ICC profile when determining image colorspace
2020-03-11 04:03:09 -07:00
James R. Barlow
b3b61c152c
Handle malformed DocumentInfo ( #497 )
...
User submitted a PDF in which /Trailer /Info pointed to the XMP metadata
block instead of a DocumentInfo dictionary. Fix and add test.
2020-03-03 03:27:01 -08:00
James R. Barlow
f6d7aa6e33
Refactor page rotation and re-enable message at info level
2020-01-30 17:35:20 -08:00
James R. Barlow
bcf77375c0
Fix grammar in output message
2020-01-28 07:33:28 -08:00
James R. Barlow
e860c56b75
Fix regression: metadata updates not taking effect
2020-01-17 23:01:37 -08:00
James R. Barlow
ce97af5a79
Add OCR quality measurement API
2020-01-17 03:10:27 -08:00
James R. Barlow
3831c4cd4d
Refactor metadata_fixup
2020-01-14 01:10:15 -08:00
James R. Barlow
123fde174d
Don't use debug.log in pytest
...
pytest does not reset the state of logging if we install a file handler,
which will cause FileNotFoundError after the temporary folder is removed.
Semi-related:
https://github.com/pytest-dev/pytest/issues/5502
2020-01-06 01:46:19 -08:00
James R. Barlow
6f5d77d930
Also generate log file in temp folder on verbose mode
2020-01-05 21:33:32 -08:00
James R. Barlow
5b6ab1e003
lept: improve lib not found error message
...
Closes #471
2020-01-05 01:05:53 -08:00
James R. Barlow
32041c43e1
tests: improve tesseract coverage
2020-01-04 02:35:14 -08:00
James R. Barlow
599028bebb
tesseract: don't explicitly set lstm_use_matrix
...
Apparently tesseract does this own its own as needed.
2020-01-04 01:17:33 -08:00
James R. Barlow
6faa8f7221
logging: always log process arguments and stderr when at debug
...
Also remove ad-hoc logging of this information.
2020-01-01 16:48:48 -08:00
James R. Barlow
a4dc5e365f
logging: fix incorrect usage: logging.Logger()
2020-01-01 16:47:36 -08:00
James R. Barlow
e2a563cc76
logging: create a debug log when -k parameter is issued
2020-01-01 16:47:15 -08:00
James R. Barlow
2f1c743227
Rewrite main pool loop
...
pytest-cov documentation recommends using explicit
management of multiprocessing.Pool rather than the context manager.
This is supposed to work better for collecting coverage data, particularly
on Windows.
2019-12-31 16:23:41 -08:00
James R. Barlow
16dd8b54a8
ghostscript: don't delete output_file that will never exist
...
We stream output now, so no point in deleting.
2019-12-30 22:38:38 -08:00
James R. Barlow
c4dc5269d2
tests: remove some obscure things from coverage
2019-12-30 21:16:16 -08:00
James R. Barlow
c36e9950ae
tests: test TqdmConsole
2019-12-30 17:51:09 -08:00
James R. Barlow
0c0d53b10f
tests: AcroForm test case did not work correctly; fixed
2019-12-30 17:50:32 -08:00
James R. Barlow
63de7e1677
Improve error message for unreadable input files
2019-12-30 16:14:52 -08:00
James R. Barlow
b0e92760a2
tests: add coverage for helpers
2019-12-30 15:52:10 -08:00
James R. Barlow
708113a514
Windows: Remove Program Files cache from ocrmypdf.exec
...
@lru_cache doesn't work here, so let's just remove it.
2019-12-29 02:36:20 -08:00
James R. Barlow
868b3b4abd
exec/init: os.get_exec_path() returns list not str
2019-12-28 16:11:08 -08:00
James R. Barlow
a53a3937c2
Fix exception on parsing Ghostscript error messages
2019-12-20 11:25:45 -08:00
James R. Barlow
c5edff2c2f
Sort imports
2019-12-19 15:31:18 -08:00
James R. Barlow
39da931a56
Look in Program Files for executables and liblept5.dll
2019-12-19 12:11:32 -08:00
James R. Barlow
9fe354359b
Generally update documentation about available platforms
2019-12-19 00:27:37 -08:00
James R. Barlow
9559b0b186
Use pikepdf to perform qpdf.check()
2019-12-11 01:21:15 -08:00
James R. Barlow
91456e19a4
pdfa.py: Fix misleading comment
2019-12-11 01:05:47 -08:00
James R. Barlow
a2d89f67c4
Improve help messages for Windows
2019-12-10 01:44:00 -08:00
James R. Barlow
f34130d193
Fixed case where page image was not converted to JPEG
...
If a preprocessing option was used,
and all original images on the page were JPEGs,
and --output-type=pdf, then
images would saved as Flate instead
of converted to JPEG.
2019-12-10 01:07:59 -08:00
James R. Barlow
c5571388e2
Improve test coverage of _sync.py
2019-12-10 01:06:27 -08:00
James R. Barlow
b354511ac9
ghostscript: document need to write to stdout when using txtwrite
2019-12-09 16:17:10 -08:00
James R. Barlow
65855dc14c
Fix close_fds=True on Windows Python 3.6
2019-12-09 16:17:10 -08:00
James R. Barlow
cac4a8b9b6
Suppress duplicate error messages from Ghostscript
2019-12-06 15:14:15 -08:00
James R. Barlow
1c1b60fa9f
Add typing hints for ocr() function
2019-12-06 15:10:54 -08:00
James R. Barlow
6b745d892f
Merge branch 'windows'
2019-12-06 15:09:09 -08:00
James R. Barlow
fbf271a3ec
Remove Tesseract < 4.0 specific check
2019-12-06 15:06:02 -08:00
James R. Barlow
8077718804
Possible fix to loss of log adapter state
2019-12-06 15:05:58 -08:00
James R. Barlow
b8b7ecfe7f
Fix DecompressionBomb related errors due to Windows process differences
2019-12-04 21:10:27 -08:00