James R. Barlow
6a7ed7d359
Make logging output a lot more useful
2016-02-08 00:58:14 -08:00
James R. Barlow
6289afa1a6
Better: custom logging factory to avoid whatever ruffus is doing
2016-02-08 00:18:52 -08:00
James R. Barlow
9bb6fa04cb
Return logging to a semblance of normalcy
2016-02-08 00:09:31 -08:00
James R. Barlow
afb6f6f5c9
Render preview as .jpg instead of .png
...
Smaller file size of JPEG seems to help performance, although the
difference is only about 1%.
2016-02-07 15:49:10 -08:00
James R. Barlow
8a69671dbd
Suppress debug message
2016-02-07 15:43:57 -08:00
James R. Barlow
178aee4687
Make rotation optional (for now it's off, possibly should be on)
2016-02-07 15:43:45 -08:00
James R. Barlow
8484caddfb
Tweak pipeline, allowing --pdf-renderer to use JPEGs instead of PNGs
2016-02-07 15:36:51 -08:00
James R. Barlow
08313316de
Cleanup auto-rotation
2016-02-07 15:06:54 -08:00
James R. Barlow
1d0eca5c63
All four rotation directions working
2016-02-07 06:09:01 -08:00
James R. Barlow
fe89232a30
Fix autorotate for some lossless cases
2016-02-07 05:59:46 -08:00
James R. Barlow
4b51b521e2
Implement autorotate (provided lossless reconstruction is disabled)
...
Works for a single page file, probably
Although arguably rotation is not quite lossless, and the two could be
mutually exclusive anyway, so maybe this is it. Did not check in some
debugging changes (lossless=False, text debugging=True)
PyPDF seems to get merging wrong when one of the pages is rotated.
2016-02-07 03:27:33 -08:00
James R. Barlow
e9ec458304
tesseract: add command to access OSD values
2016-02-07 03:21:32 -08:00
James R. Barlow
54b0ddd787
ghostscript: don't try to "help" autorotation
...
It uses text direction alone -- unreliable guide.
2016-02-07 03:20:42 -08:00
James R. Barlow
daa3916430
Fix img2pdf 0.2 usage
...
All tests pass when forced to rely on img2pdf, so seems okay
2016-02-05 15:13:26 -08:00
James R. Barlow
e9b87cefcc
Try img2pdf 0.2
2016-02-05 14:38:37 -08:00
James R. Barlow
7e5c37137b
Merge branch 'develop' into release/v3.2
2016-02-04 23:42:06 -08:00
James R. Barlow
4b65e0b093
Set JPEG output quality to 95 for better transcoding
2016-02-04 18:49:09 -08:00
James R. Barlow
9893ebf889
Suppress tesseract argument printout
2016-02-04 17:26:36 -08:00
James R. Barlow
303eb3e93a
Merge commit 'ca546d70e5bff9e9b115371f7813f3c326822bd8' into release/v3.2
2016-02-04 17:25:56 -08:00
Sean Whitton
6a5ea2d64a
fix shebang in hocrtransform.py
2016-02-03 17:48:35 -07:00
James R. Barlow
37c508f3f8
Better versioning: no silly version files, but wrong ver in development
...
Small price to pay.
2016-01-19 16:07:52 -08:00
James R. Barlow
26e36422cc
More fiddling with version
2016-01-19 15:07:21 -08:00
James R. Barlow
f82cb002bc
Try automatic versioning with setuptools_scm
2016-01-19 13:27:18 -08:00
James R. Barlow
c1eb047a4b
Fix name of pdfa_def.ps
...
Used to include a copy of the parent dir's name.
2016-01-19 13:11:03 -08:00
James R. Barlow
626ca18f5c
Remove stale comment
2016-01-19 13:02:35 -08:00
James R. Barlow
a0952bfca3
Optimize: use img2pdf stream instead of repeated copies
2016-01-18 20:24:46 -08:00
James R. Barlow
fc0479f110
Fix all but test_oversample[hocr]
2016-01-15 15:46:47 -08:00
James R. Barlow
62728205b6
Implement image+text merging in other cases
...
5 failed, 28 passed
failures:
test_oversample[hocr], test_skip_ocr, test_skip_big, test_maximum_options[hocr],
test_blank_input_pdf,
2016-01-15 15:38:08 -08:00
James R. Barlow
dc0fb25e64
Render hocr page: no longer needs an image as input
2016-01-15 15:16:47 -08:00
James R. Barlow
7067110308
Add safety check to prevent merge from running when not sensible
2016-01-15 14:54:45 -08:00
James R. Barlow
599d889703
Implement "perfect reconstruction" - transfer page and watermark OCR layer
...
Works, does not account for changes to clean/deskew, etc.
Surprisingly, it works. PyPDF2 fixes since last attempt?
2016-01-15 14:39:12 -08:00
James R. Barlow
7c558b3713
Move pageinfo test into tests folder
2016-01-11 17:40:44 -08:00
James R. Barlow
074c1d71b4
Activate --tesseract-pagesegmode
2016-01-11 17:19:32 -08:00
James R. Barlow
1fca9a004d
Adjust command line parameters
...
Was splitting each argument to --tesseract-config into a list of single
character strings
2016-01-11 16:57:19 -08:00
James R. Barlow
b485a1ef78
Override ruffus' handling of --jobs
...
Ruffus treats omitted parameter as -j1. For our purposes it makes more
sense for omitting the parameter to mean "use all CPUs". As such we
must be able to distinguish -j1 from the parameter -j being omitted.
Telling ruffus to ignore the argument actually just makes it not auto
generate the argument. We can add an argument back with the same name.
2016-01-09 19:07:48 -08:00
James R. Barlow
326ef7a3ac
Merge branch 'hotfix/v3.1.1' into develop
...
# Conflicts:
# RELEASE_NOTES.rst
2016-01-09 18:55:04 -08:00
James R. Barlow
6af0815681
Bump version
2016-01-09 18:45:06 -08:00
James R. Barlow
66c2b9b78e
Merge branch 'hotfix/v3.1.1' into develop
2016-01-09 18:38:09 -08:00
James R. Barlow
61b3ccb57c
Place ruffus database in temporary folder
...
Because we don't really use ruffus checkpoint feature, putting the
database in a permanent location does not help anything, but does cause
large database files and problems if the .ruffus_history.sqlite wanted
to be in a writable location.
2016-01-04 13:23:47 -08:00
James R. Barlow
49cd6cc619
Off by one error in page info calculation
2015-12-21 09:35:02 -08:00
James R. Barlow
102bd07019
Check for encrypted PDF and complain appropriately
2015-12-17 10:37:54 -08:00
James R. Barlow
1731ce2a44
Environment variables can now override default programs
2015-12-17 09:05:10 -08:00
James R. Barlow
276f421c44
Did a quick test of Ghostscript vs QPDF at PDF page splitting
...
qpdf won so hard it wasn't funny, even though it must be called once
per page to do the job. Perhaps Ghostscript interprets it as a call to
render the page?
time bash qpdf-test.fish ../tests/resources/multipage.pdf
0.07 real 0.02 user 0.03 sys
time gs -sDEVICE=pdfwrite -dSAFER -o '%06d.pdf' ../tests/resources/multipage.pdf
5.12 real 5.06 user 0.04 sys
2015-12-17 08:49:08 -08:00
James R. Barlow
133357779a
All subprocess invocations refactored out of main.py
2015-12-17 08:31:18 -08:00
James R. Barlow
5d8167b232
Move PDF validation check to qpdf.py
2015-12-17 08:28:00 -08:00
James R. Barlow
e76ae8c46c
Move more qpdf calls into qpdf.py
2015-12-17 08:24:48 -08:00
James R. Barlow
53a7c0e668
Refactor qpdf subprocess calls into module
2015-12-17 08:19:53 -08:00
James R. Barlow
4ca243e490
Merge commit '9f374461559460527e47237323e511123f31b6b0' into feature/envvars
2015-12-17 07:27:26 -08:00
Shem Pasamba
d7c7559b05
Use boolean instead of integers
2015-12-17 11:23:27 +08:00
Shem Pasamba
b2b66d1344
Don't exit when qpdf repair was successful
2015-12-17 11:20:20 +08:00