Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhougaofeng
magic_pdf
Commits
554e45af
Commit
554e45af
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update user_api.py
parent
4c1c1b4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
magic_pdf/user_api.py
magic_pdf/user_api.py
+4
-4
No files found.
magic_pdf/user_api.py
View file @
554e45af
...
...
@@ -31,7 +31,7 @@ def parse_txt_pdf(pdf_bytes: bytes, pdf_models: list, imageWriter: AbsReaderWrit
"""
解析文本类pdf
"""
print
(
'----------------------------------------------------------这是解析文本类pdf-------------------------------------------------------------'
)
#
print('----------------------------------------------------------这是解析文本类pdf-------------------------------------------------------------')
pdf_info_dict
=
parse_pdf_by_txt
(
pdf_bytes
,
pdf_models
,
...
...
@@ -54,7 +54,7 @@ def parse_ocr_pdf(pdf_bytes: bytes, pdf_models: list, imageWriter: AbsReaderWrit
"""
解析ocr类pdf
"""
print
(
'---------------------------------------------------------这是解析ocr类pdf------------------------------------------------------------------'
)
#
print('---------------------------------------------------------这是解析ocr类pdf------------------------------------------------------------------')
pdf_info_dict
=
parse_pdf_by_ocr
(
pdf_bytes
,
pdf_models
,
...
...
@@ -78,7 +78,7 @@ def parse_union_pdf(pdf_bytes: bytes, pdf_models: list, imageWriter: AbsReaderWr
"""
ocr和文本混合的pdf,全部解析出来
"""
logger
.
info
(
'---------------------------------------------------------ocr和文本混合的pdf,全部解析出来------------------------------------------------'
)
#
logger.info('---------------------------------------------------------ocr和文本混合的pdf,全部解析出来------------------------------------------------')
def
parse_pdf
(
method
):
try
:
return
method
(
...
...
@@ -109,6 +109,6 @@ def parse_union_pdf(pdf_bytes: bytes, pdf_models: list, imageWriter: AbsReaderWr
pdf_info_dict
[
"_parse_type"
]
=
PARSE_TYPE_TXT
pdf_info_dict
[
"_version_name"
]
=
__version__
logger
.
info
(
f
'这是pdf_union_pdf中的pdf_dict:
\n
{
pdf_info_dict
}
\n
-----------------------------------------------------------------------------------------'
)
#
logger.info(f'这是pdf_union_pdf中的pdf_dict:\n{pdf_info_dict}\n-----------------------------------------------------------------------------------------')
return
pdf_info_dict
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment