James R. Barlow
065bddbc6c
Reformat with ruff format
2024-04-07 00:25:32 -07:00
James R. Barlow
067f429dde
Merge branch 'main' of github.com:ocrmypdf/OCRmyPDF
2024-03-26 15:34:00 -07:00
Daniel Lovegrove and GitHub
6895c2d70f
Fix Broken Documentation Links ( #1275 )
...
* Update URL for PDFMARK documentation
For reference, here is a link to the old PDF:
https://web.archive.org/web/20190806035303/https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdfmark_reference.pdf
It appears Adobe converted the PDF into a webpage-based document, the
wording seems to almost identical b/w the PDF and the website.
* Fix cross-references to JBIG2 page
* Fix links for Fedora + Arch + HEAD revision install
Fedora 39 has been released, and the package tracker no longer includes
a release overview for Fedora 37 hence why it was removed here.
2024-03-22 14:38:52 -07:00
James R. Barlow
686481982a
Fix naming of hOCR rendered files
2024-03-22 13:27:20 -07:00
James R. Barlow
8a747f005a
pixels -> megapixels
...
Fixes #1265
2024-02-29 15:31:07 -08:00
James R. Barlow
3a3635f7f9
Python 3.10 cleanup, manual fixes
2024-02-14 12:48:17 -08:00
James R. Barlow
6a746a1cbb
ruff linting/Python 3.10 cleanup
2024-02-14 12:41:51 -08:00
James R. Barlow
353b34e695
Merge branch 'feature/pageboxes'
2024-02-12 01:41:56 -08:00
James R. Barlow
7d63355c3c
Use hocr renderer for LTR languages
2024-02-12 01:41:41 -08:00
James R. Barlow
42ff7fc842
Fix handling of pages that are restored to correct orientation with /Rotate
...
Appears inversion of CTM was incorrect, introduced in commit 9898904
2024-02-12 01:32:26 -08:00
James R. Barlow
3b9d4b7f0a
Attempt to deal with oddball mediaboxes
2024-02-11 15:34:54 -08:00
James R. Barlow
11f53fe9a9
First cut at propagating page boxes
...
This would fix the immediate issue, but does not address an offset mediabox.
2024-02-11 15:34:54 -08:00
James R. Barlow
07b6f06f11
optimize: log images with unclear decode tables
2024-02-01 15:42:40 -08:00
James R. Barlow
f87fc7b12d
gs: check for text-corrupting versions
2024-01-07 01:33:49 -08:00
James R. Barlow
602f5632cb
hocr: fix unbound local
2024-01-07 01:33:36 -08:00
James R. Barlow
9fbbcf7599
Merge branch 'feature/hocrdebug'
2024-01-07 01:22:54 -08:00
James R. Barlow
9498f01f59
hocr: Pass text direction for standalone words
2024-01-06 16:21:21 -08:00
James R. Barlow
2c59aca5a1
Fix render_mode ON_TOP when previous content stream does not restore CTM
2024-01-06 16:20:55 -08:00
James R. Barlow
51301d69c9
Change default graft render mode back to underneath
...
It was mistakenly changed to on top at some point
2024-01-06 16:20:30 -08:00
James R. Barlow
7e608fd1df
Use Courier as debug font
2024-01-06 14:24:25 -08:00
James R. Barlow
103c3e0cd6
Drop Ghostscript CVE warning and adjust version down to 9.54
...
Most distros have probably now backported the CVE fix. Dropped version to 9.54 so RHEL 9 can use recent ocrmypdf.
2024-01-01 13:02:57 -08:00
James R. Barlow
b71d16dd96
Draw RTL text with reversed matrix instead of reversing characters
2023-12-24 01:34:03 -08:00
James R. Barlow
fd593eb5e9
Reversing character order for RTL helps output
2023-12-24 01:24:44 -08:00
James R. Barlow
a0b98abb94
Improve and externalize debug rendering settings
2023-12-24 00:10:09 -08:00
James R. Barlow
18353e1e94
Also fix space rendering
2023-12-24 00:09:47 -08:00
James R. Barlow
9adcad84da
Overhaul debug rendering to support possible use of Helvetica for testing
2023-12-23 23:47:35 -08:00
James R. Barlow
f2714586d8
Fix upside down glyphless font
2023-12-23 23:44:37 -08:00
James R. Barlow
1db8b0b943
Temporarily revert default renderer to sandwich while investigating regressions in macOS Preview
2023-12-23 16:19:44 -08:00
James R. Barlow
e6095a9949
Fix text rendering issue with new hOCR text renderer
2023-12-20 12:26:06 -08:00
James R. Barlow
5b2f2e6290
Merge branch 'feature/modernhocr'
2023-12-03 15:17:02 -08:00
James R. Barlow
f6e90a5934
hOCR renderer is now default
2023-12-02 19:58:00 -08:00
James R. Barlow
43618e6b3f
Move canvas API to pikepdf and import it
2023-12-02 19:42:35 -08:00
James R. Barlow
e97f89de3b
Refactor font so glyphless isn't as hard coded
2023-12-02 08:55:01 -08:00
James R. Barlow
11d3e32f1e
Fix hocrtransform CLI
2023-12-02 08:08:29 -08:00
James R. Barlow
2affa83efe
Remove code that attempted to manage xattrs out of output file
...
Feature requested in issue #1179 , but caused #1195 . On further review,
there is no platform independent way to manage extended attributes
and it is not clear copying them through is necessarily the sensible
thing to do.
Closes #1179 .
2023-11-29 23:25:51 -08:00
James R. Barlow
c90d5cd84b
Fix Ghostscript installation instructions and add warning
2023-11-29 14:10:04 -08:00
James R. Barlow
fec53be841
Remove next major release deprecations
2023-11-21 00:47:51 -08:00
James R. Barlow
3f7b540f76
Drop Python 3.9 support
2023-11-21 00:46:00 -08:00
James R. Barlow
d217856166
Make hocrdebug work, and try to handle CJK spacing better
2023-11-21 00:33:02 -08:00
James R. Barlow
e2be457e9b
Avoid divzero
2023-11-20 23:08:00 -08:00
James R. Barlow
4850f486d2
Make text API more like an accessor
2023-11-20 22:59:50 -08:00
James R. Barlow
729c7febd9
Fix placement of spaces in debug mode
2023-11-20 22:44:12 -08:00
James R. Barlow
6c6aca2f1e
Refactor save_state
2023-11-20 22:29:21 -08:00
James R. Barlow
c69823f496
Refactor; accumulate content stream as bytes rather than discrete pikepdf objects
2023-11-20 22:11:59 -08:00
James R. Barlow
73f8f6aac8
Add RTL output - seems to work, but debug does not
2023-11-20 20:28:07 -08:00
James R. Barlow
d944254e45
hocr: typing cont'd
2023-11-20 17:07:52 -08:00
James R. Barlow
f7ddffe554
hocr: typing
2023-11-20 16:52:55 -08:00
James R. Barlow
8a73ed5d5a
Fix JBIG2 not updating progress bar
2023-11-20 16:25:30 -08:00
James R. Barlow
03669183d7
Rationalize canvas interface
2023-11-20 15:54:13 -08:00
James R. Barlow
74e101a2fa
Improve canvas interface with chaining
2023-11-20 14:42:48 -08:00