Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
250e68c1cd | ||
|
|
6a380ee99c | ||
|
|
3c90bd96a9 |
+8
-1
@@ -6,15 +6,22 @@ Please always read this file before installing the package
|
|||||||
Download software here: https://github.com/jbarlow83/OCRmyPDF/tags
|
Download software here: https://github.com/jbarlow83/OCRmyPDF/tags
|
||||||
|
|
||||||
|
|
||||||
v4.0.4:
|
v4.0.5:
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Fixes
|
Fixes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Remove some verbose debug messages from v4.0.4
|
||||||
|
- Fixed temporary that wasn't being deleted
|
||||||
- DPI is now calculated correctly for cropped images, along with other image transformations
|
- DPI is now calculated correctly for cropped images, along with other image transformations
|
||||||
- Inline images are now checked during DPI calculation instead of rejecting the image
|
- Inline images are now checked during DPI calculation instead of rejecting the image
|
||||||
|
|
||||||
|
v4.0.4:
|
||||||
|
=======
|
||||||
|
|
||||||
|
Released with verbose debug message turned on. Do not use. Skip to v4.0.5.
|
||||||
|
|
||||||
|
|
||||||
v4.0.3:
|
v4.0.3:
|
||||||
=======
|
=======
|
||||||
|
|||||||
+1
-1
@@ -378,7 +378,7 @@ def cleanup_working_files(*args):
|
|||||||
@transform(
|
@transform(
|
||||||
input=options.input_file,
|
input=options.input_file,
|
||||||
filter=formatter('(?i)\.pdf'),
|
filter=formatter('(?i)\.pdf'),
|
||||||
output=work_folder + '{basename[0]}.repaired.pdf',
|
output=os.path.join(work_folder, '{basename[0]}.repaired.pdf'),
|
||||||
extras=[_log, _pdfinfo, _pdfinfo_lock])
|
extras=[_log, _pdfinfo, _pdfinfo_lock])
|
||||||
def repair_pdf(
|
def repair_pdf(
|
||||||
input_file,
|
input_file,
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ def _interpret_contents(contentstream):
|
|||||||
image_raster_settings = []
|
image_raster_settings = []
|
||||||
inline_images = []
|
inline_images = []
|
||||||
|
|
||||||
print(operations)
|
|
||||||
for op in operations:
|
for op in operations:
|
||||||
operands, command = op
|
operands, command = op
|
||||||
if command == b'q':
|
if command == b'q':
|
||||||
@@ -182,7 +181,6 @@ def _get_dpi(ctm_shorthand, image_size):
|
|||||||
def _find_page_images(page, pageinfo, contentsinfo):
|
def _find_page_images(page, pageinfo, contentsinfo):
|
||||||
|
|
||||||
for n, im in enumerate(contentsinfo.inline_images):
|
for n, im in enumerate(contentsinfo.inline_images):
|
||||||
print(n)
|
|
||||||
settings, shorthand = im
|
settings, shorthand = im
|
||||||
image = {}
|
image = {}
|
||||||
image['name'] = str('inline-%02d' % n)
|
image['name'] = str('inline-%02d' % n)
|
||||||
@@ -295,7 +293,6 @@ def _pdf_get_pageinfo(infile, pageno: int):
|
|||||||
return pageinfo
|
return pageinfo
|
||||||
|
|
||||||
contentsinfo = _interpret_contents(contentstream)
|
contentsinfo = _interpret_contents(contentstream)
|
||||||
print(contentsinfo)
|
|
||||||
pageinfo['images'] = [im for im in _find_page_images(
|
pageinfo['images'] = [im for im in _find_page_images(
|
||||||
page, pageinfo, contentsinfo)]
|
page, pageinfo, contentsinfo)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user