Jim Barlow
4a9337f757
PEP8
2015-02-20 15:42:06 -08:00
Jim Barlow
22b0733a1d
Merge branch 'feature/findskew' into develop
2014-11-13 16:00:27 -08:00
Jim Barlow
f69054cb17
Fix parameter order problems
...
Put TESS_CFG_FILES last because it is optional and can be blank. If
omitted it breaks the sequence of subsequent parameters. Also cleanup
text output in this new mode.
2014-09-25 03:50:01 -07:00
Jim Barlow
09bbe92611
Add command line option to skip pages that contain font data
...
If a page contains font data, the script would abort, unless -f was given,
in which case it would use pdftoppm to rasterize the font into a bitmap
and then attempt to OCR it. -f is almost certainly not what users want
unless they want to debug OCR or something.
If a PDF already has fonts it either was OCR'd already, or it is
a composite file containing, for example, some scanned documents appended
to a text report. In the latter case, this -s option provides OCR on
pages that don't have it without changing those that do, and if a PDF
was completely OCRed it will be converted to PDF/A. In batch jobs with
a mix of OCR and non-OCR the implicit conversion to PDF/A is also useful.
2014-09-25 02:43:40 -07:00
fritz-hh
c873de6ca4
Consider that the hocr file has not always the same name
...
Closes #72
2014-04-27 16:01:11 +02:00
Jim Barlow
8cfbdaf0d0
Fix a silly typo, and other minor cleanup
2014-01-19 19:06:19 -08:00
Jim Barlow
6703434976
Replace ImageMagick-convert with Leptonica
2014-01-19 14:47:51 -08:00
fritz-hh
6d203e3eee
portability improvements + minor changes
2014-01-15 21:23:41 +01:00
Mansour Behabadi
a78630ce99
Make src scripts executable
...
Signed-off-by: Mansour Behabadi <mansour@oxplot.com >
2014-01-14 17:50:46 +11:00
fritz-hh
447b291e70
minor changes
2014-01-13 18:03:44 +01:00
fritz-hh
bf02ee3bdc
Resolved conflits with jbarlow83 pull request
2014-01-12 15:37:14 +01:00
fritz-hh
a3c7fba02d
minor changes (comments)
2014-01-11 22:26:29 +01:00
fritz-hh
a8cd7febf6
remove spurious space in img number
...
Tell the script that "nbImg" is a number, so that leading/trailing
spaces are removed
2014-01-11 22:15:53 +01:00
fritz-hh
20c008b84f
avoid spurious error msg if no image in pdf
2014-01-11 22:05:19 +01:00
fritz-hh
e56fd53d06
poppler syntax (rather than xpdf syntax)
2014-01-11 16:19:52 +01:00
Jim Barlow
24a84d6380
Fix pdffonts error when filename contains a space
2014-01-09 16:44:24 -08:00
Jim Barlow
3a46ea1f36
Merge branch 'for-upstream/pdftoppm-error' into for-upstream/mono
2014-01-09 16:20:05 -08:00
Jim Barlow
d33779f301
Detect monochrome images and extract them as PBM (1 bpp)
2014-01-09 16:15:24 -08:00
Jim Barlow
d6ea0793b8
Fix ocrPage.sh pdftoppm error on OS X 10.9
2014-01-09 16:04:37 -08:00
fritz-hh
b0b7e32783
fixes #40 and code cleanup
2014-01-07 21:51:15 +01:00
fritz-hh
c6cc098e47
create symbolic links and not copy
...
If deskew and/or cleanup is not requested, do not copy the files, but
just create symbolic link.
This saves disk place and makes the script slightly quicker
2014-01-06 23:08:35 +01:00
fritz-hh
fc3de64dce
Changed debug page name
...
In order to have the debug page after the normal panel in the final PDF
file
2014-01-06 22:41:29 +01:00
fritz-hh
414c4e3f3c
round dpi value correctly
2014-01-06 22:32:11 +01:00
fritz-hh
6a9f38d31e
removed unused variables
2014-01-06 22:23:41 +01:00
fritz-hh
aa4256d35c
fixes #44
...
The x/y resolutions are not computed separately anymore.
We do not check anymore if x and y resolutions are different (not
measure could anyway be taken if they were not equal...)
2014-01-06 22:23:00 +01:00
fritz-hh
8a1241ba44
minor changes (indentation and fct name)
2014-01-06 22:05:49 +01:00
fritz-hh
7eab052e0f
Improved consistency of tmp file names
2014-01-06 22:00:58 +01:00
fritz-hh
c0d8508264
minor change in log msg
2014-01-06 19:30:19 +01:00
fritz-hh
10a3d26291
default PDI definition moved to cfg file
2014-01-05 22:01:45 +01:00
fritz-hh
5945454597
Support for -f option
...
Fixes #16
2014-01-04 21:24:33 +01:00
fritz-hh
7d76c46731
Check if page already contains a font
2014-01-04 18:05:21 +01:00
fritz-hh
0abe0f1f10
minor change
2014-01-03 17:00:35 +01:00
fritz-hh
4e60c9ba09
Warn user in case of low resolution
2013-12-30 23:55:26 +01:00
fritz-hh
95fe7cd3bc
Oversampling + more than 1 img
...
- Oversampling resolution can now be set from the cmd line (-o option)
- If a page contains more than one image, warn the user but process the
page anyway with a default resolution
2013-12-30 23:44:38 +01:00
fritz-hh
79ec1d994e
Automatic oversampling
...
- If resolution is too low (<250dpi) perform automatic oversampling of
the image
- comments improved
- log messages improved
2013-12-30 22:27:10 +01:00
fritz-hh
bfc4f7a28d
better resolution handling ( fixes #38 )
...
- dpi computation moved to in dedicated function
- do not exit in case of resolution mismatch (fixes #38 )
- comments improved
2013-11-29 10:37:09 +01:00
fritz-hh
7a74ebbcc3
comments and log messages improved
2013-11-29 00:39:44 +01:00
fritz-hh
7542188592
Removed bashism
...
== does not exist in bourne shell
2013-11-27 23:44:45 +01:00
fritz-hh
5e0f8be4b1
Various improvements
...
-Constants moved to config.sh
- Use "python2" cmd instead of "python"
- few other minor changes
2013-11-27 22:34:21 +01:00
fritz-hh
2b0103a4e6
basic implementation of parallel page processing
...
- basic implementation of parallel page processing using GNU parallel
- processing around 40% faster on dual core processor
2013-05-05 22:33:54 +02:00
fritz-hh
9db805c4ad
new file to OCR one page
...
Required to perform OCR of several pages in parallal (using GNU
parallel)
2013-05-05 20:45:27 +02:00