James R. Barlow
85d6fb8ce9
Don't use stdout for Ghostscript
...
Apparently, Ghostscript simply uses temporary files when asked to write to stdout. We're already using temporary files internally, so this eliminates some redundant copies.
2024-11-21 17:02:03 -08:00
James R. Barlow
a659f83d67
Remove invalid hyperlink annotations to satisfy Ghostscript 10.x during PDF/A conversion
...
Closes #1425
2024-11-16 19:02:10 -08:00
James R. Barlow
dbd3c93757
Fix issue with unpickling HOCRResult
...
Fixes [Bug]: HOCRResult.from_json() not unpickling correctly #1427
2024-11-10 02:05:57 -08:00
James R. Barlow
d303b42c86
Add documentation to PdfMinerState
2024-10-27 22:01:36 -07:00
James R. Barlow
f77f701a50
Fix quadratic time performance regression on scanning pages
2024-10-27 21:57:53 -07:00
James R. Barlow
bf62562787
Merge branch 'feature/docker-ubuntu-24'
2024-10-27 17:39:06 -07:00
James R. Barlow
6c6cbfd4d6
Make images extracted for jbig2enc optimization have unique filenames
...
Fixes #1396
2024-10-27 17:38:52 -07:00
James R. Barlow
ee5acbe94e
Repair PDF before all processing
...
Some PDFs choke both pdfminer.six and Ghostscript but the issues can be fixed first.
Fixes #1403
2024-10-27 17:37:46 -07:00
James R. Barlow
5e478a7774
do_get_pdfinfo: typing
2024-10-27 17:23:20 -07:00
James R. Barlow
fe4725658e
unpaper: fix regex
2024-10-27 14:57:21 -07:00
James R. Barlow
9d042767cc
Attempt to fix matrix and unpaper version error
2024-10-27 14:04:45 -07:00
James R. Barlow
6f755321b8
Ignore unpaper warning message when checking version
...
Fixes #1409
2024-10-27 13:06:30 -07:00
James R. Barlow
706681deb8
Improve some type checks
2024-10-27 12:54:29 -07:00
James R. Barlow
c283cf0a0d
Fix incorrect return value
2024-10-27 12:32:40 -07:00
James R. Barlow
0f82d7223e
Fix some typing issues
2024-10-27 12:31:16 -07:00
James R. Barlow
9a6150ae53
Refactor get_pdfinfo common code
2024-10-27 12:09:33 -07:00
James R. Barlow
fec0948a13
If inside a container, remind user that path is relative to container
2024-10-27 11:55:38 -07:00
James R. Barlow
18b59c57b4
Refactor our tests that check if we are in a container
2024-10-27 11:55:22 -07:00
James R. Barlow
944d99bdc1
Fix PROGRAM_NAME
2024-08-31 01:23:55 -07:00
James R. Barlow
b9dd0a5e3c
Use hatchling and hatch-vcs as build backend
2024-08-31 01:08:23 -07:00
James R. Barlow
b3324c3b4e
Don't assume /Mask is always a Stream
...
Fixes #1377
2024-08-31 00:37:52 -07:00
James R. Barlow
cd910fbf21
Improve "PDF/A conversion failed" message
2024-08-10 01:34:02 -07:00
James R. Barlow
d35d008806
Increase pdfminer's bufsiz to mitigate token splitting issue
...
Fixes #1361
2024-07-31 02:11:47 -07:00
James R. Barlow
f5662d5eb0
Consider Masks and stencil masks when calculating DPI
...
Fixes #1362
2024-07-29 15:46:30 -07:00
James R. Barlow
39010dd255
Handle incompatible jbig2.exe from TeX Live
...
Fixes #1363
2024-07-27 01:09:34 -07:00
James R. Barlow
f974e3b3c1
ghostscript: change input filename order for 10.03.1
...
Ghostscript now expects the pdfa.ps file to precede other files. Fixes #1359 .
2024-07-22 14:56:03 -07:00
James R. Barlow
46b49cc176
Suppress missing jbig2dec warning message
...
Windows users can't resolve it easily.
2024-07-22 14:54:40 -07:00
James R. Barlow
621d6a0b89
Fix image size calculation when SMask dimensions do not match image
...
Closes [Bug]: Ghostscript rasterizing failed #1351
2024-07-16 13:36:48 -07:00
James R. Barlow
980a5472b6
Fix test failures due to 4dde378
2024-07-09 15:54:53 -07:00
James R. Barlow
4dde3786c2
Fix KeyError '/Subtype'
...
Fixes #1350
2024-07-09 14:46:47 -07:00
James R. Barlow
6edf756849
optimize: trap Hifi..Error
...
Fixes [Bug]: NotImplementedError: not sure how to get colorspace #1315
2024-06-30 00:08:51 -07:00
James R. Barlow
4fb1bb4de6
pipeline: fix typo in message
2024-06-30 00:08:31 -07:00
James R. Barlow
0544d06c3d
Fix calculation of image printed area (used in finding weighted DPI for OCR)
...
Fixes #1334
2024-06-21 15:13:51 -07:00
James R. Barlow
2f53b27651
Disable progbar for linearizing when --no-progress-bar set
...
Fixes #1332
2024-06-14 14:18:33 -07:00
James R. Barlow
214a333e2d
Block Tesseract 5.4.0
2024-06-11 14:44:54 -07:00
James R. Barlow
981bbf1105
optimize: add a recursion guard to avoid chasing cyclic form xobjects
2024-06-01 01:52:21 -07:00
James R. Barlow
59f6bc8306
More Tesseract-specific language checks to its plugin
2024-06-01 00:15:50 -07:00
James R. Barlow
653c4ffb45
hocr: accept multiple spaces in bounding boxes
...
Fixes #1322
2024-05-31 16:22:27 -07:00
James R. Barlow
d947ca258e
Prevent issuing equ and osd as languages
2024-05-25 01:17:57 -07:00
James R. Barlow
f3d6387bca
Fix "OCR" progress bar not matching actual progress
2024-05-21 01:35:14 -07:00
James R. Barlow
9a3c5a3f7c
Add progressbar for metadata_fixup
...
Might take time for big files. Pdf.open() potentially is expensive as well, but QPDF doesn't give us progress feedback for that.
Closes Show progress during postprocessing #1313
2024-05-19 00:46:50 -07:00
James R. Barlow
950c700274
Fix Ghostscript PDF/A progressbar not displaying
2024-05-19 00:44:21 -07:00
James R. Barlow
26432c38a9
Raise exception if rotate pages threshold adjusted without --rotate-pages
...
Fixes Make usage of --rotate-pages-threshold clearer #1309
2024-05-18 23:49:27 -07:00
James R. Barlow
28be50136c
hocr: If a line box's coords are invalid, log and error and don't render
...
Addresses [Bug]: Crash on multiple .pdf files #1312
Not actually a fix, but at least it will get us better diagnostics. Appears old Tesseract 4.x generates bad line boxes at times.
2024-05-18 23:32:18 -07:00
James R. Barlow
99c78650b6
Add better error message for PDFs with invalid CTMs
...
Closes #1303
2024-05-07 14:00:30 -07:00
James R. Barlow
9ba4e3ab46
Log unusual exceptions when trying to obtain a version
...
Fixes #1262
2024-04-07 14:39:08 -07:00
James R. Barlow
5fdcb7602b
Make downsampling large images that Tesseract would otherwise error on into default behavior
...
Fixes #1281
2024-04-07 13:43:20 -07:00
James R. Barlow
b4db1b741f
optimize: fix handling of [/FlateDecode none] - type images
...
Closes #1271
2024-04-07 01:44:08 -07:00
James R. Barlow
7a8cc21e31
Add support for sidecar output to io.BytesIO
...
Closes #1252
2024-04-07 01:38:55 -07:00
James R. Barlow
d6342cb8c2
Add heif/heic input image support
2024-04-07 00:33:13 -07:00