pdf2docx


Namepdf2docx JSON
Version 0.5.8 PyPI version JSON
download
home_pagehttps://artifex.com/
SummaryOpen source Python library converting pdf to docx.
upload_time2024-01-22 17:24:20
maintainer
docs_urlNone
authorArtifex
requires_python>=3.6
licenseGPL v3
keywords pdf-to-word pdf-to-docx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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://pdf2docx.readthedocs.io/en/latest/installation.html)
- [Quickstart](https://pdf2docx.readthedocs.io/en/latest/quickstart.html)
    - [Convert PDF](https://pdf2docx.readthedocs.io/en/latest/quickstart.convert.html)
    - [Extract table](https://pdf2docx.readthedocs.io/en/latest/quickstart.table.html)
    - [Command Line Interface](https://pdf2docx.readthedocs.io/en/latest/quickstart.cli.html)
    - [Graphic User Interface](https://pdf2docx.readthedocs.io/en/latest/quickstart.gui.html)
- [Technical Documentation (In Chinese)](https://pdf2docx.readthedocs.io/en/latest/techdoc.html)
- [API Documentation](https://pdf2docx.readthedocs.io/en/latest/modules.html)

## Sample

![sample_compare.png](https://s1.ax1x.com/2020/08/04/aDryx1.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://artifex.com/",
    "name": "pdf2docx",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "pdf-to-word,pdf-to-docx",
    "author": "Artifex",
    "author_email": "support@artifex.com",
    "download_url": "https://files.pythonhosted.org/packages/23/35/aa7661b48f7ecd3d619135d95b00e9d471360e5e291c44aa0bca6f59679e/pdf2docx-0.5.8.tar.gz",
    "platform": null,
    "description": "English | [\u4e2d\u6587](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://pdf2docx.readthedocs.io/en/latest/installation.html)\n- [Quickstart](https://pdf2docx.readthedocs.io/en/latest/quickstart.html)\n    - [Convert PDF](https://pdf2docx.readthedocs.io/en/latest/quickstart.convert.html)\n    - [Extract table](https://pdf2docx.readthedocs.io/en/latest/quickstart.table.html)\n    - [Command Line Interface](https://pdf2docx.readthedocs.io/en/latest/quickstart.cli.html)\n    - [Graphic User Interface](https://pdf2docx.readthedocs.io/en/latest/quickstart.gui.html)\n- [Technical Documentation (In Chinese)](https://pdf2docx.readthedocs.io/en/latest/techdoc.html)\n- [API Documentation](https://pdf2docx.readthedocs.io/en/latest/modules.html)\n\n## Sample\n\n![sample_compare.png](https://s1.ax1x.com/2020/08/04/aDryx1.png)\n",
    "bugtrack_url": null,
    "license": "GPL v3",
    "summary": "Open source Python library converting pdf to docx.",
    "version": "0.5.8",
    "project_urls": {
        "Homepage": "https://artifex.com/"
    },
    "split_keywords": [
        "pdf-to-word",
        "pdf-to-docx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b5f96d567df395c0409baf2b4dd9cd30d1e977c70672fe7ec2a684af1e6aa41c",
                "md5": "b38cb1cc13ef12f34a876c43956e5e09",
                "sha256": "8c5f439ba8147d59c20d33dadb275ff75a7f19b3b6179a9afda29ae2962514dc"
            },
            "downloads": -1,
            "filename": "pdf2docx-0.5.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b38cb1cc13ef12f34a876c43956e5e09",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 132015,
            "upload_time": "2024-01-22T17:23:58",
            "upload_time_iso_8601": "2024-01-22T17:23:58.996957Z",
            "url": "https://files.pythonhosted.org/packages/b5/f9/6d567df395c0409baf2b4dd9cd30d1e977c70672fe7ec2a684af1e6aa41c/pdf2docx-0.5.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2335aa7661b48f7ecd3d619135d95b00e9d471360e5e291c44aa0bca6f59679e",
                "md5": "bf52cd65289bf6bfc513ac6e3896a00e",
                "sha256": "e723f639728193468602b69eade2fe62df5f5d339d2630228e325f4cc61c1918"
            },
            "downloads": -1,
            "filename": "pdf2docx-0.5.8.tar.gz",
            "has_sig": false,
            "md5_digest": "bf52cd65289bf6bfc513ac6e3896a00e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3566987,
            "upload_time": "2024-01-22T17:24:20",
            "upload_time_iso_8601": "2024-01-22T17:24:20.343120Z",
            "url": "https://files.pythonhosted.org/packages/23/35/aa7661b48f7ecd3d619135d95b00e9d471360e5e291c44aa0bca6f59679e/pdf2docx-0.5.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-22 17:24:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pdf2docx"
}
        
Elapsed time: 0.69790s