FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bionicpython/bionicpython/converter.py at master · nathfavour/bionicpython · GitHub
nathfavour
/
bionicpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
10
Star
54
Code
Issues
4
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
bionicpython
/
bionicpython
/
converter.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (19 loc) · 700 Bytes
Breadcrumbs
bionicpython
/
bionicpython
/
converter.py
Copy path
File metadata and controls
26 lines (19 loc) · 700 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# from pdf2docx import Converter
# pdf_file = '/Users/xcode/Downloads/maths.pdf'
# docx_file = '/Users/xcode/Downloads/maths.docx'
# # convert pdf to docx
# cv = Converter(pdf_file)
# cv.convert(docx_file) # all pages by default
# cv.close()
import
argparse
from
pdf2docx
import
Converter
parser
=
argparse
.
ArgumentParser
(
description
=
'Convert PDF to DOCX'
)
parser
.
add_argument
(
'--pdf'
,
help
=
'Path to the PDF file'
,
required
=
True
)
parser
.
add_argument
(
'--docx'
,
help
=
'Path to the output DOCX file'
,
required
=
True
)
args
=
parser
.
parse_args
()
pdf_file
=
args
.
pdf
docx_file
=
args
.
docx
# convert pdf to docx
cv
=
Converter
(
pdf_file
)
cv
.
convert
(
docx_file
)
# all pages by default
cv
.
close
()
Back
|
FazBrowse Home
|
New Git URL