James R. Barlow
076363d78e
Disable JPEG passthrough for Ghostscript 9.23
...
Seems to corrupt JPEGs involved in image masks?
2018-04-17 16:31:03 -07:00
James R. Barlow
a620724d6a
Fix PDF/A validation failure due to timezone being omitted from /ModDate
2018-04-17 15:16:48 -07:00
James R. Barlow
2482296e2b
hocr: avoid division by zero
...
Issue #253 - PDF that produces the error is not available, but if font_width
is zero, chances are the text is nonprinting characters, so suppress it.
2018-04-14 17:24:21 -07:00
James R. Barlow
7fc897e6dc
Fix NameError 'ghostscript'
2018-04-12 21:24:05 -07:00
James R. Barlow
9b731d63b8
Set Ghostscript -sColorConversionStrategy the way old/new versions expect
2018-04-12 16:28:48 -07:00
James R. Barlow
10aa59f674
v6.1.4 fix test suite regression with Ghostscript 9.23
2018-04-12 15:16:54 -07:00
James R. Barlow
c95db246d4
v6.1.4 merge
2018-04-11 15:58:00 -07:00
James R. Barlow
4b6153ad18
Use defusedxml for XML parsing when reading XMP
2018-04-10 14:25:13 -07:00
James R. Barlow
11b6f77df0
unpaper: close images on error paths
2018-04-09 13:05:12 -07:00
James R. Barlow
db8b0319dd
get_version: repeat system error messages if the process exists with a signal
2018-04-09 13:04:51 -07:00
James R. Barlow
be41ff6d54
Update flowchart
...
[ci skip]
2018-04-05 21:26:37 -07:00
James R. Barlow
753e6274ab
Tell unpaper to use --layout none so it won't blank out multi column text
2018-04-05 02:14:33 -07:00
James R. Barlow
1b01d45dd2
Warn about Python 3.5 page count issue
2018-04-02 19:29:17 -07:00
James R. Barlow
7a1cd39b21
Fix creation date metadata lost from input
...
Closes #247
2018-04-02 17:53:39 -07:00
James R. Barlow
90644a3017
pipeline: refactoring, use with block for images
2018-03-31 13:26:40 -07:00
James R. Barlow
ace439910e
Remove PyMuPDF 1.12.4 shim
2018-03-30 12:33:27 -07:00
James R. Barlow
7f038568de
Add envvar to ease testing without PyMuPDF
2018-03-30 12:32:48 -07:00
James R. Barlow
e0f3f07907
Fix text reported as found on all pages when PyMuPDF is not available
2018-03-30 00:10:53 -07:00
James R. Barlow
b36df9cf9e
pdfa: codecs.encode -> hexlify (simpler)
2018-03-29 22:17:23 -07:00
James R. Barlow
527f4d0101
Workaround fitz not escaping parentheses
...
Closes #239
2018-03-28 23:23:34 -07:00
James R. Barlow
40ef4f0bbe
Add new argument --skip-repair to skip the repair step
2018-03-28 00:54:58 -07:00
James R. Barlow
d0271d5049
More debug messages on repair; update notes
2018-03-28 00:39:38 -07:00
James R. Barlow
5becfcf8ea
Refactor fitz ImportError trap
2018-03-27 21:38:02 -07:00
James R. Barlow
112e8d6c18
Fix regression: PDF/A broken without fitz
2018-03-27 21:33:10 -07:00
James R. Barlow
1d8d49a01d
Add PyMuPDF to preamble
2018-03-27 21:32:38 -07:00
James R. Barlow
5050155685
Add warning for large file size increases
2018-03-27 15:49:16 -07:00
James R. Barlow
6a4df78bc0
Add _naive_find_text to search for text when fitz is not available
2018-03-27 13:36:17 -07:00
James R. Barlow
3e444f6a90
Make fitz optional
2018-03-26 13:22:09 -07:00
James R. Barlow
45dbff6401
Fix table of contents not preserved in PDF/A
2018-03-26 02:23:19 -07:00
James R. Barlow
746969207a
Remove deprecated --pdf-renderer tess4, which was renamed to sandwich
...
Should have been cut in v6.0.0
2018-03-26 01:17:22 -07:00
James R. Barlow
1caebaefb5
tesseract: Fix FileExistsError on if output file was created at timeout
2018-03-25 21:38:20 -07:00
James R. Barlow
a2f499de01
Remove pageinfo.py which release notes said was gone for v6
2018-03-25 12:16:56 -07:00
James R. Barlow
f4bca89722
Remove Tesseract 4 message
2018-03-25 12:16:31 -07:00
James R. Barlow
af085b79dd
Move ocrmypdf to src/ocrmypdf
2018-03-24 23:59:08 -07:00
Jim Barlow
9adb0d696f
Prepare for Python packaging - move to ocrmypdf folder
2015-07-25 18:22:04 -07:00
Jim Barlow
7b255b575a
Metadata override from command lien
2015-07-25 18:12:25 -07:00
Jim Barlow
d7a9f3a2ab
Transfer Unicode document information from input PDF to output PDF
...
What a pain getting Unicode right, but there it is.
I cannot find anything to confirm that it is acceptable to put the PDF/A
definition file at the end of the Ghostscript inputs. I did this because
Ghostscript seems to copy document info from the last document on the
list so reportlab's information "wins" in normal order, so it fixes that
issue, and reportlab 'helpfully' fills in all of those fields even if it
does not have information.
It could also work to pass document information along to reportlab, and
set it in each output PDF: .debug.pdf, .rendered.pdf, and .page.pdf to
ensure that whatever page is last in the pipeline has the right
information. Or perhaps it's possible to write a Postscript trailer that
overwrites any previous docinfo with no side effects, but I can't find
any information on how to do that. I don't think it's worth pursuing
unless this arrangement causes some problem with PDF/A generation.
On a minor note, Jhove misreads the way I have encoded the strings in
producing its validation log. It reads them as UTF-16 little endian, so
will tend to produce a string of Asian characters in place of the real
data.
2015-07-25 18:05:25 -07:00
Jim Barlow
abf2e7e9bb
Copy document metadata from source document into output (untested)
...
This works for ASCII only; will do Unicode version.
2015-07-25 15:31:02 -07:00
Jim Barlow
72e5fa9ba0
Reimplement debug pages
2015-07-25 14:14:02 -07:00
Jim Barlow
32c1078d2c
Reimplement skip text pages
2015-07-25 14:13:32 -07:00
Jim Barlow
133f901a69
Change @subdivide to @split
...
@split is for "1 to many" operations, so it's the right tool for this
case.
2015-07-25 02:58:34 -07:00
Jim Barlow
42cd683ec0
Try to make pdfinfo less obnoxious by printing too many decimals
2015-07-25 02:47:59 -07:00
Jim Barlow
151eb05377
For now, unpaper is the only deskew provider
2015-07-25 01:46:16 -07:00
Jim Barlow
16177d0a52
Remove ability to override temporary (working) folder
...
Little point to this feature - on most platforms the environment
variable can be overridden if desired to set a new root location.
At the same time, this change removes the ability to resume a partially
executed pipeline by deleting all of the results on failure. If -k is
provided then the temporary files will survive but there's no way to
resume from them. Because resuming doesn't really work away and would
only be useful to users experiencing very specific problems, this is
probably not worth it, so no major loss. The intent of -k is to assist
debugging.
2015-07-25 01:45:26 -07:00
Jim Barlow
5ce544289f
Automatically try to use all available CPUs
2015-07-25 01:10:14 -07:00
Jim Barlow
77bd35c3c7
Remove duplicate test folder
2015-07-25 01:00:40 -07:00
Jim Barlow
0c5c208db0
Goodbye, so long, farewell, shell...
2015-07-25 00:57:07 -07:00
Jim Barlow
60eb745331
Split selecting final image and render PDF result into separate tasks
...
Simplifies the logic - one deals with all images, the other details
with an image and .hocr. Also add JPEG reconversion.
2015-07-25 00:54:00 -07:00
Jim Barlow
9f90b5cb0a
Modularize unpaper; get -d and -c working again
2015-07-25 00:22:56 -07:00
Jim Barlow
5adff94545
Remove more dead/old code
2015-07-24 15:41:24 -07:00