English | [ä¸æ–‡](README_CN.md)
# pdf2docx
![python-version](https://img.shields.io/badge/python->=3.6-green.svg)
[![codecov](https://codecov.io/gh/dothinking/pdf2docx/branch/master/graph/badge.svg)](https://codecov.io/gh/dothinking/pdf2docx)
[![pypi-version](https://img.shields.io/pypi/v/pdf2docx.svg)](https://pypi.python.org/pypi/pdf2docx/)
![license](https://img.shields.io/pypi/l/pdf2docx.svg)
![pypi-downloads](https://img.shields.io/pypi/dm/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 [TODO]
- Parse and re-create paragraph
- OCR text [TODO]
- 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
- list style [TODO]
- external hyper link
- paragraph horizontal alignment (left/right/center/justify) and vertical spacing
- 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
- [Installation](https://dothinking.github.io/pdf2docx/installation.html)
- [Quickstart](https://dothinking.github.io/pdf2docx/quickstart.html)
- [Convert PDF](https://dothinking.github.io/pdf2docx/quickstart.convert.html)
- [Extract table](https://dothinking.github.io/pdf2docx/quickstart.table.html)
- [Command Line Interface](https://dothinking.github.io/pdf2docx/quickstart.cli.html)
- [Graphic User Interface](https://dothinking.github.io/pdf2docx/quickstart.gui.html)
- [Technical Documentation (In Chinese)](https://dothinking.github.io/pdf2docx/techdoc.html)
- [API Documentation](https://dothinking.github.io/pdf2docx/modules.html)
## Sample
![sample_compare.png](https://s1.ax1x.com/2020/08/04/aDryx1.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/dothinking/pdfconvert",
"name": "pdfconvert",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "pdf-to-word,pdf-to-docx",
"author": "dothinking",
"author_email": "train8808@gmail.com",
"download_url": "",
"platform": null,
"description": "English | [\u00e4\u00b8\u00ad\u00e6\u2013\u2021](README_CN.md)\n\n# pdf2docx \n\n![python-version](https://img.shields.io/badge/python->=3.6-green.svg)\n[![codecov](https://codecov.io/gh/dothinking/pdf2docx/branch/master/graph/badge.svg)](https://codecov.io/gh/dothinking/pdf2docx)\n[![pypi-version](https://img.shields.io/pypi/v/pdf2docx.svg)](https://pypi.python.org/pypi/pdf2docx/)\n![license](https://img.shields.io/pypi/l/pdf2docx.svg)\n![pypi-downloads](https://img.shields.io/pypi/dm/pdf2docx)\n\n- Extract data from PDF with `PyMuPDF`, e.g. text, images and drawings \n- Parse layout with rule, e.g. sections, paragraphs, images and tables\n- Generate docx with `python-docx`\n\n## Features\n\n- Parse and re-create page layout\n - page margin\n - section and column (1 or 2 columns only)\n - page header and footer [TODO]\n\n- Parse and re-create paragraph\n - OCR text [TODO]\n - text in horizontal/vertical direction: from left to right, from bottom to top\n - font style, e.g. font name, size, weight, italic and color\n - text format, e.g. highlight, underline, strike-through\n - list style [TODO]\n - external hyper link\n - paragraph horizontal alignment (left/right/center/justify) and vertical spacing\n\n- Parse and re-create image\n\t- in-line image\n - image in Gray/RGB/CMYK mode\n - transparent image\n - floating image, i.e. picture behind text\n\n- Parse and re-create table\n - border style, e.g. width, color\n - shading style, i.e. background color\n - merged cells\n - vertical direction cell\n - table with partly hidden borders\n - nested tables\n\n- Parsing pages with multi-processing\n\n*It can also be used as a tool to extract table contents since both table content and format/style is parsed.*\n\n## Limitations\n\n- Text-based PDF file\n- Left to right language\n- Normal reading direction, no word transformation / rotation\n- Rule-based method can't 100% convert the PDF layout\n\n\n## Documentation\n\n- [Installation](https://dothinking.github.io/pdf2docx/installation.html)\n- [Quickstart](https://dothinking.github.io/pdf2docx/quickstart.html)\n - [Convert PDF](https://dothinking.github.io/pdf2docx/quickstart.convert.html)\n - [Extract table](https://dothinking.github.io/pdf2docx/quickstart.table.html)\n - [Command Line Interface](https://dothinking.github.io/pdf2docx/quickstart.cli.html)\n - [Graphic User Interface](https://dothinking.github.io/pdf2docx/quickstart.gui.html)\n- [Technical Documentation (In Chinese)](https://dothinking.github.io/pdf2docx/techdoc.html)\n- [API Documentation](https://dothinking.github.io/pdf2docx/modules.html)\n\n## Sample\n\n![sample_compare.png](https://s1.ax1x.com/2020/08/04/aDryx1.png)\n\n",
"bugtrack_url": null,
"license": "GPL v3",
"summary": "parse PDF files to docx",
"version": "0.1",
"project_urls": {
"Homepage": "https://github.com/dothinking/pdfconvert"
},
"split_keywords": [
"pdf-to-word",
"pdf-to-docx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1bb03b2988cd48f715904f91a5f127b088b1ced3afa22c9fe8370aa8fe02e440",
"md5": "84ad8256655d3caa681dab6a560cf9ac",
"sha256": "d4779f8235cccb6ebb4b73c433c1f027b53129df2eb118b5b1af35dce0c05827"
},
"downloads": -1,
"filename": "pdfconvert-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "84ad8256655d3caa681dab6a560cf9ac",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 14979,
"upload_time": "2023-10-30T18:39:14",
"upload_time_iso_8601": "2023-10-30T18:39:14.397811Z",
"url": "https://files.pythonhosted.org/packages/1b/b0/3b2988cd48f715904f91a5f127b088b1ced3afa22c9fe8370aa8fe02e440/pdfconvert-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-30 18:39:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dothinking",
"github_project": "pdfconvert",
"github_not_found": true,
"lcname": "pdfconvert"
}