mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-01-03 18:52:38 +00:00
Fix detailed page analysis enabled at wrong time
This commit is contained in:
parent
4704f7ed1d
commit
e3b65d4288
@ -167,7 +167,7 @@ def repair_and_parse_pdf(
|
||||
detailed_page_analysis = True
|
||||
|
||||
try:
|
||||
pdfinfo = PdfInfo(output_file, log=log)
|
||||
pdfinfo = PdfInfo(output_file, detailed_page_analysis=detailed_page_analysis, log=log)
|
||||
except pikepdf.PasswordError as e:
|
||||
raise EncryptedPdfError()
|
||||
except pikepdf.PdfError as e:
|
||||
|
||||
@ -593,7 +593,7 @@ def _pdf_get_all_pageinfo(infile, detailed_page_analysis, log=None):
|
||||
log = Mock()
|
||||
|
||||
pdf = pikepdf.open(infile)
|
||||
if not detailed_page_analysis:
|
||||
if detailed_page_analysis:
|
||||
pages_xml = None
|
||||
else:
|
||||
pages_xml = ghosttext.extract_text_xml(infile, pdf, pageno=None, log=log)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user