pdf2docx
- Extract data from PDF with
PyMuPDF, e.g. text, images and drawings - Parse layout with rule, e.g. sections, paragraphs, images and tables
- Generate docx with
python-docx
Features
-
Parse and re-create page layout
- page margin
- section and column (1 or 2 columns only)
- page header and footer
-
Parse and re-create paragraph
- text in horizontal/vertical direction: from left to right, from bottom to top
- font style, e.g. font name, size, weight, italic and color
- text format, e.g. highlight, underline, strike-through
- external hyper link
- paragraph horizontal alignment (left/right/center/justify) and vertical spacing
- list style
-
Parse and re-create image
- in-line image
- image in Gray/RGB/CMYK mode
- transparent image
- floating image, i.e. picture behind text
-
Parse and re-create table
- border style, e.g. width, color
- shading style, i.e. background color
- merged cells
- vertical direction cell
- table with partly hidden borders
- nested tables
-
Parsing pages with multi-processing
It can also be used as a tool to extract table contents since both table content and format/style is parsed.
Limitations
- Text-based PDF file
- Left to right language
- Normal reading direction, no word transformation / rotation
- Rule-based method can't 100% convert the PDF layout
Documentation
Sample
Metadata
Release files for pdf2docx 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pdf2docx-0.5.3.tar.gz | 3.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdf2docx-0.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.2 MB
Release files / pdf2docx-0.5.3.tar.gz
| Download URL | pdf2docx-0.5.3.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e7274a25196c71197a7a23a6e2e53eaf949fd3a97c3918bf694a7371c86fc61
|
|
BLAKE2b-256 checksum How to use checksums |
a00b257bfd877fd826eb465a64c75f05c6147203d2521cbeed4c7e7b31a8a115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / pdf2docx-0.5.3-py3-none-any.whl
| Download URL | pdf2docx-0.5.3-py3-none-any.whl |
|---|---|
| Size | 146.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08bc47d38fd2fb7bc794a9d6bce444383c6f8c35c0da25ecb0c862d212e6ff3e
|
|
BLAKE2b-256 checksum How to use checksums |
f58e3087955883703bfdfd76dd020a3080a9e984320098951c23592ef492f134
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|