Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
709c65b41a | ||
|
|
67f99c5bb7 | ||
|
|
d55e673d9c | ||
|
|
21b90d2d14 | ||
|
|
2def7e3392 |
@@ -12,6 +12,13 @@ may be unreliable. Use the API to depend on precise behavior.
|
|||||||
The public API may be useful in scripts that launch OCRmyPDF processes or that
|
The public API may be useful in scripts that launch OCRmyPDF processes or that
|
||||||
wish to use some of its features for working with PDFs.
|
wish to use some of its features for working with PDFs.
|
||||||
|
|
||||||
|
v11.3.1
|
||||||
|
=======
|
||||||
|
|
||||||
|
- Declare support for new versions: pdfminer.six 20201018 and pikepdf 2.x
|
||||||
|
- Fix warning related to ``--pdfa-image-compression`` that appears at the wrong
|
||||||
|
time.
|
||||||
|
|
||||||
v11.3.0
|
v11.3.0
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ setup(
|
|||||||
python_requires=' >= 3.6',
|
python_requires=' >= 3.6',
|
||||||
setup_requires=[ # can be removed whenever we can drop pip 9 support
|
setup_requires=[ # can be removed whenever we can drop pip 9 support
|
||||||
'cffi >= 1.9.1', # to build the leptonica module
|
'cffi >= 1.9.1', # to build the leptonica module
|
||||||
'pytest-runner', # to enable python setup.py test
|
|
||||||
'setuptools_scm', # so that version will work
|
'setuptools_scm', # so that version will work
|
||||||
'setuptools_scm_git_archive', # enable version from github tarballs
|
'setuptools_scm_git_archive', # enable version from github tarballs
|
||||||
],
|
],
|
||||||
@@ -73,8 +72,8 @@ setup(
|
|||||||
'cffi >= 1.9.1', # must be a setup and install requirement
|
'cffi >= 1.9.1', # must be a setup and install requirement
|
||||||
'coloredlogs >= 14.0', # strictly optional
|
'coloredlogs >= 14.0', # strictly optional
|
||||||
'img2pdf >= 0.3.0, < 0.5', # pure Python, so track HEAD closely
|
'img2pdf >= 0.3.0, < 0.5', # pure Python, so track HEAD closely
|
||||||
'pdfminer.six >= 20191110, != 20200720, <= 20200726',
|
'pdfminer.six >= 20191110, != 20200720, <= 20201018',
|
||||||
'pikepdf >= 1.14.0, < 2',
|
'pikepdf >= 1.14.0, < 3',
|
||||||
'Pillow >= 7.0.0',
|
'Pillow >= 7.0.0',
|
||||||
'pluggy >= 0.13.0, < 1.0',
|
'pluggy >= 0.13.0, < 1.0',
|
||||||
'reportlab >= 3.3.0', # oldest released version with sane image handling
|
'reportlab >= 3.3.0', # oldest released version with sane image handling
|
||||||
|
|||||||
@@ -213,12 +213,12 @@ def check_options_optimizing(options):
|
|||||||
|
|
||||||
|
|
||||||
def check_options_advanced(options):
|
def check_options_advanced(options):
|
||||||
if options.pdfa_image_compression != 'auto' and options.output_type.startswith(
|
if options.pdfa_image_compression != 'auto' and not options.output_type.startswith(
|
||||||
'pdfa'
|
'pdfa'
|
||||||
):
|
):
|
||||||
log.warning(
|
log.warning(
|
||||||
"--pdfa-image-compression argument has no effect when "
|
"--pdfa-image-compression argument only applies when "
|
||||||
"--output-type is not 'pdfa', 'pdfa-1', or 'pdfa-2'"
|
"--output-type is one of 'pdfa', 'pdfa-1', or 'pdfa-2'"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ def optimize(input_file: Path, output_file: Path, context, save_settings) -> Non
|
|||||||
)
|
)
|
||||||
ratio = input_size / output_size
|
ratio = input_size / output_size
|
||||||
savings = 1 - output_size / input_size
|
savings = 1 - output_size / input_size
|
||||||
log.info(f"Optimize ratio: {ratio:.2f} savings: {(100 * savings):.1f}%")
|
log.info(f"Optimize ratio: {ratio:.2f} savings: {(savings):.1%}")
|
||||||
|
|
||||||
if savings < 0:
|
if savings < 0:
|
||||||
log.info("Image optimization did not improve the file - discarded")
|
log.info("Image optimization did not improve the file - discarded")
|
||||||
|
|||||||
Reference in New Issue
Block a user