Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
107dc260
authored
2022-06-13 20:02:21 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add f3 folder
1 parent
a825541a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
src/apps/doc/management/commands/folder_f3_process.py
src/common/tools/pdf_to_img.py
src/apps/doc/management/commands/folder_f3_process.py
0 → 100644
View file @
107dc26
This diff is collapsed.
Click to expand it.
src/common/tools/pdf_to_img.py
View file @
107dc26
...
...
@@ -24,6 +24,23 @@ WH_COUPLE_4 = (100, 300)
WH_COUPLE_5
=
(
100
,
200
)
class
PDFBuild
:
def
__init__
(
self
,
path
):
self
.
path
=
path
def
insert_img
(
self
,
img_path_list
):
if
os
.
path
.
exists
(
self
.
path
):
pdf
=
fitz
.
Document
(
self
.
path
)
else
:
pdf
=
fitz
.
Document
()
for
img_path
in
img_path_list
:
new_page
=
pdf
.
newPage
()
new_page
.
insertImage
(
new_page
.
rect
,
img_path
)
pdf
.
save
(
self
.
path
)
pdf
.
close
()
class
PDFHandler
:
def
__init__
(
self
,
path
,
img_dir_path
,
document_name
=
None
):
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment