msoffice2pdf-UTF-8


Namemsoffice2pdf-UTF-8 JSON
Version 1.0.0.2 PyPI version JSON
download
home_pagehttps://github.com/phosha/msoffice2pdf
SummaryThis package aims to convert Office file types to PDF using Microsoft Office or LibreOffice.
upload_time2024-07-05 22:14:10
maintainerNone
docs_urlNone
authorRobson Soares de Lima
requires_python>=3.6
licenseMIT
keywords msoffice pdf convert libreoffice .doc .docx .xls .xlsx .ppt .pptx .txt .xml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # msoffice2pdf

# Форк для изменения кодировки строки


[![Python](https://badgen.net/badge/language/python/orange?icon=python)]()
[![Flask](https://badgen.net/badge/type/library/red?icon=)]()

>_This package aims to convert Microsoft Office file types to PDF. This lib uses the comtypes package which makes it easy to access and implement custom, dispatch-based COM interfaces or LibreOffice software._

### Prerequisites

*_**[Python](https://www.python.org/downloads/)**_ **>=3.6** installed on the environment.*

### Installation

Step 1:

```
pip3 install msoffice2pdf
```

Step 2

### (Windons Only):

For Microsoft Office use:

*   Delete all cache files from the folder below in case there is any error with Microsoft Office conversion:
 `C:\Users\<User>\AppData\Local\Programs\Python\Python39\Lib\site-packages\comtypes\gen`

*   For Windows Server

> **Step 1:**
>
> Start > Run > dcomcnfg.exe
>
> **Step 2:**
>
>  Select: Computers -> My Computer -> Config DCOM -> Microsoft Word 97-2003 Documents -> Properties
>  Tab general select level authentication to None
>  Tab security select customize and add All
>  Tab identify select this user and add Admin user and password
>  
> **Step 3:**
>  
> Select: Computers -> My Computer -> Config DCOM -> Microsoft Excel Application -> Properties
> Tab general select level authentication to None
> Tab security select customize and add All
> Tab identify select this user and add Admin user and password
>  
> **Step 4:**
>  
> Select: Computers -> My Computer -> Config DCOM -> Microsoft PowerPoint Application -> Properties
> Tab general select level authentication to None
> Tab security select customize and add All
> Tab identify select this user and add Admin user and password


For LibreOffice use:

Install LibreOffice last version:

https://www.libreoffice.org/download/download/

###  (Ubuntu Only):

Install **LibreOffice**:

`sudo add-apt-repository -y ppa:libreoffice/ppa`

`sudo apt-get update`

`sudo apt-get install libreoffice libreoffice-style-breeze`

### Example:

For use in `Windows` environment and `soft=0` Microsoft Office must be installed.

For use in `Windows` environment and `soft=1` you need the latest version of LibreOffice(soffice) installed.

For `Ubuntu(linux)` environment it is only possible to use `soft=1`, that is, LibreOffice(soffice).

Supported files: **[".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".txt", ".xml"]**

```python
from msoffice2pdf import convert

output = convert(source="C:/Users/<User>/Downloads/file.docx", output_dir="C:/Users/<User>/Downloads", soft=0)

print(output)
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/phosha/msoffice2pdf",
    "name": "msoffice2pdf-UTF-8",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "msoffice, pdf, convert, libreoffice, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .xml",
    "author": "Robson Soares de Lima",
    "author_email": "Phosha <kdrvpavel@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7e/a9/03587cbbbb84f11672d6ca0b60b87bbad51cdaf914fc282378c588f11b06/msoffice2pdf_utf_8-1.0.0.2.tar.gz",
    "platform": null,
    "description": "# msoffice2pdf\n\n# \u0424\u043e\u0440\u043a \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0438\n\n\n[![Python](https://badgen.net/badge/language/python/orange?icon=python)]()\n[![Flask](https://badgen.net/badge/type/library/red?icon=)]()\n\n>_This package aims to convert Microsoft Office file types to PDF. This lib uses the comtypes package which makes it easy to access and implement custom, dispatch-based COM interfaces or LibreOffice software._\n\n### Prerequisites\n\n*_**[Python](https://www.python.org/downloads/)**_ **>=3.6** installed on the environment.*\n\n### Installation\n\nStep 1:\n\n```\npip3 install msoffice2pdf\n```\n\nStep 2\n\n### (Windons Only):\n\nFor Microsoft Office use:\n\n*   Delete all cache files from the folder below in case there is any error with Microsoft Office conversion:\n `C:\\Users\\<User>\\AppData\\Local\\Programs\\Python\\Python39\\Lib\\site-packages\\comtypes\\gen`\n\n*   For Windows Server\n\n> **Step 1:**\n>\n> Start > Run > dcomcnfg.exe\n>\n> **Step 2:**\n>\n>  Select: Computers -> My Computer -> Config DCOM -> Microsoft Word 97-2003 Documents -> Properties\n>  Tab general select level authentication to None\n>  Tab security select customize and add All\n>  Tab identify select this user and add Admin user and password\n>  \n> **Step 3:**\n>  \n> Select: Computers -> My Computer -> Config DCOM -> Microsoft Excel Application -> Properties\n> Tab general select level authentication to None\n> Tab security select customize and add All\n> Tab identify select this user and add Admin user and password\n>  \n> **Step 4:**\n>  \n> Select: Computers -> My Computer -> Config DCOM -> Microsoft PowerPoint Application -> Properties\n> Tab general select level authentication to None\n> Tab security select customize and add All\n> Tab identify select this user and add Admin user and password\n\n\nFor LibreOffice use:\n\nInstall LibreOffice last version:\n\nhttps://www.libreoffice.org/download/download/\n\n###  (Ubuntu Only):\n\nInstall **LibreOffice**:\n\n`sudo add-apt-repository -y ppa:libreoffice/ppa`\n\n`sudo apt-get update`\n\n`sudo apt-get install libreoffice libreoffice-style-breeze`\n\n### Example:\n\nFor use in `Windows` environment and `soft=0` Microsoft Office must be installed.\n\nFor use in `Windows` environment and `soft=1` you need the latest version of LibreOffice(soffice) installed.\n\nFor `Ubuntu(linux)` environment it is only possible to use `soft=1`, that is, LibreOffice(soffice).\n\nSupported files: **[\".doc\", \".docx\", \".xls\", \".xlsx\", \".ppt\", \".pptx\", \".txt\", \".xml\"]**\n\n```python\nfrom msoffice2pdf import convert\n\noutput = convert(source=\"C:/Users/<User>/Downloads/file.docx\", output_dir=\"C:/Users/<User>/Downloads\", soft=0)\n\nprint(output)\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This package aims to convert Office file types to PDF using Microsoft Office or LibreOffice.",
    "version": "1.0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/phosha/msoffice2pdf"
    },
    "split_keywords": [
        "msoffice",
        " pdf",
        " convert",
        " libreoffice",
        " .doc",
        " .docx",
        " .xls",
        " .xlsx",
        " .ppt",
        " .pptx",
        " .txt",
        " .xml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9909fe034507fdd447cce1f4532e6951c054fb120240c32070c6816a630be704",
                "md5": "7f74b176c9f9c26876e9052fde6ece2f",
                "sha256": "6a4610f4c074f24ef0af617741f8c923328db2d0618af590c04bab7308a16842"
            },
            "downloads": -1,
            "filename": "msoffice2pdf_UTF_8-1.0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f74b176c9f9c26876e9052fde6ece2f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5221,
            "upload_time": "2024-07-05T22:14:08",
            "upload_time_iso_8601": "2024-07-05T22:14:08.890564Z",
            "url": "https://files.pythonhosted.org/packages/99/09/fe034507fdd447cce1f4532e6951c054fb120240c32070c6816a630be704/msoffice2pdf_UTF_8-1.0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ea903587cbbbb84f11672d6ca0b60b87bbad51cdaf914fc282378c588f11b06",
                "md5": "97b29024361c2f5f6e147ae4291f43c2",
                "sha256": "839ec49eb4c2b85e512a660912702058a2ff918b5487c499ac3e411da15ec06f"
            },
            "downloads": -1,
            "filename": "msoffice2pdf_utf_8-1.0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "97b29024361c2f5f6e147ae4291f43c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5254,
            "upload_time": "2024-07-05T22:14:10",
            "upload_time_iso_8601": "2024-07-05T22:14:10.281216Z",
            "url": "https://files.pythonhosted.org/packages/7e/a9/03587cbbbb84f11672d6ca0b60b87bbad51cdaf914fc282378c588f11b06/msoffice2pdf_utf_8-1.0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-05 22:14:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "phosha",
    "github_project": "msoffice2pdf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "msoffice2pdf-utf-8"
}
        
Elapsed time: 0.32565s