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
45f75145
Commit
45f75145
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update pdf_server.py
parent
c2ad4c75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
magic_pdf/tools/pdf_server.py
magic_pdf/tools/pdf_server.py
+3
-3
No files found.
magic_pdf/tools/pdf_server.py
View file @
45f75145
...
...
@@ -87,7 +87,7 @@ async def pdf_ocr(request: ocrRequest):
debug_able
=
False
start_page_id
=
0
end_page_id
=
None
logger
.
info
(
f
"
method:
{
method
}
, path:
{
path
}
, output_dir:
{
output_dir
}
, config_path:
{
config_
path
}
"
)
logger
.
info
(
f
"
正在处理文件:
{
path
}
"
)
def
read_fn
(
path
):
disk_rw
=
DiskReaderWriter
(
os
.
path
.
dirname
(
path
))
...
...
@@ -109,13 +109,13 @@ async def pdf_ocr(request: ocrRequest):
end_page_id
=
end_page_id
,
)
logger
.
info
(
f
'文件解析成功:
{
output_path
}
'
)
#
logger.info(f'文件解析成功:{output_path}')
return
output_path
except
Exception
as
e
:
logger
.
exception
(
e
)
logger
.
info
(
f
'config_path:
{
config_path
}
'
)
#
logger.info(f'config_path:{config_path}')
output_path
=
parse_doc
(
path
,
config_path
)
if
output_path
:
...
...
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