Convert2PDF


NameConvert2PDF JSON
Version 0.3 PyPI version JSON
download
home_pagehttps://github.com/ashfaque/Convert2PDF
SummaryConvert from different file formats to PDF format.
upload_time2022-12-24 09:20:05
maintainer
docs_urlNone
authorAshfaque Alam
requires_python
licenseGNU GPLv3
keywords ashfaque ashfaque alam convert pdf convert to pdf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![License: GNU GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/ashfaque/Convert2PDF/blob/main/LICENSE)

## How to install
```sh
pip install Convert2PDF
```

## How to import
```python3
from Convert2PDF.ConvertToPDF import docx2pdfConvert, pptx2pdfConvert, img2pdfConvert, bmp2pdfConvert, txt2pdfConvert, mergePdfs
```

## Dependencies needs to be installed, if using `docx2pdfConvert()` & `pptx2pdfConvert()`
```sh
libreoffice
build-essential
libssl-dev
libffi-dev
python-dev
default-jre
```

## Documentation


### Convert from doc or docx to pdf format.
```python3
docx = docx2pdfConvert(f'{os.getcwd()}/file name.docx', f'{os.getcwd()}/output_dir/')
doc = docx2pdfConvert(f'{os.getcwd()}/file name.doc', f'{os.getcwd()}/output_dir/')
```


### Convert from ppt or pptx to pdf format
```python3
pptx = pptx2pdfConvert(f'{os.getcwd()}/file name.pptx', f'{os.getcwd()}/output/')
ppt = pptx2pdfConvert(f'{os.getcwd()}/file name.ppt', f'{os.getcwd()}/output/')
```


### Convert from jpeg, jpg or png ot pdf format.
```python3
jpeg = img2pdfConvert(f'{os.getcwd()}/file name.jpeg', f'{os.getcwd()}/output/file name.pdf')
jpg = img2pdfConvert(f'{os.getcwd()}/file name.jpg', f'{os.getcwd()}/output/file name.pdf')
png = img2pdfConvert(f'{os.getcwd()}/file name.png', f'{os.getcwd()}/output/file name.pdf')
```


### Convert from bmp to pdf format.
```python3
bmp = bmp2pdfConvert(f'{os.getcwd()}/file name.bmp', f'{os.getcwd()}/output/file name.pdf')
```


### Convert from txt to pdf format.
```python3
txt = txt2pdfConvert(f'{os.getcwd()}/file name.txt', f'{os.getcwd()}/output/file name.pdf')
```


### Merge all pdf files to one pdf file.
```python3
all_pdfs_path_tuple = (
                    f'{os.getcwd()}/file 1.pdf'
                    , f'{os.getcwd()}/file 2.pdf'
                    , f'{os.getcwd()}/file 2.pdf'
                    , f'{os.getcwd()}/file 3.pdf'
                    , f'{os.getcwd()}/file 4.pdf'
                    , f'{os.getcwd()}/file 5.pdf'
                )
merged = mergePdfs(*all_pdfs_path_tuple, output_pdf_file_path=f'{os.getcwd()}/output_merged_file.pdf')
```


## License
[GNU GPLv3](LICENSE)
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ashfaque/Convert2PDF",
    "name": "Convert2PDF",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ASHFAQUE,ASHFAQUE ALAM,CONVERT,PDF,CONVERT TO PDF",
    "author": "Ashfaque Alam",
    "author_email": "ashfaquealam496@yahoo.com",
    "download_url": "https://files.pythonhosted.org/packages/05/a6/af128a0b89838e065fc16816c2b6941e56137ecafc4f15ca20e51e5ca940/Convert2PDF-0.3.tar.gz",
    "platform": null,
    "description": "[![License: GNU GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/ashfaque/Convert2PDF/blob/main/LICENSE)\n\n## How to install\n```sh\npip install Convert2PDF\n```\n\n## How to import\n```python3\nfrom Convert2PDF.ConvertToPDF import docx2pdfConvert, pptx2pdfConvert, img2pdfConvert, bmp2pdfConvert, txt2pdfConvert, mergePdfs\n```\n\n## Dependencies needs to be installed, if using `docx2pdfConvert()` & `pptx2pdfConvert()`\n```sh\nlibreoffice\nbuild-essential\nlibssl-dev\nlibffi-dev\npython-dev\ndefault-jre\n```\n\n## Documentation\n\n\n### Convert from doc or docx to pdf format.\n```python3\ndocx = docx2pdfConvert(f'{os.getcwd()}/file name.docx', f'{os.getcwd()}/output_dir/')\ndoc = docx2pdfConvert(f'{os.getcwd()}/file name.doc', f'{os.getcwd()}/output_dir/')\n```\n\n\n### Convert from ppt or pptx to pdf format\n```python3\npptx = pptx2pdfConvert(f'{os.getcwd()}/file name.pptx', f'{os.getcwd()}/output/')\nppt = pptx2pdfConvert(f'{os.getcwd()}/file name.ppt', f'{os.getcwd()}/output/')\n```\n\n\n### Convert from jpeg, jpg or png ot pdf format.\n```python3\njpeg = img2pdfConvert(f'{os.getcwd()}/file name.jpeg', f'{os.getcwd()}/output/file name.pdf')\njpg = img2pdfConvert(f'{os.getcwd()}/file name.jpg', f'{os.getcwd()}/output/file name.pdf')\npng = img2pdfConvert(f'{os.getcwd()}/file name.png', f'{os.getcwd()}/output/file name.pdf')\n```\n\n\n### Convert from bmp to pdf format.\n```python3\nbmp = bmp2pdfConvert(f'{os.getcwd()}/file name.bmp', f'{os.getcwd()}/output/file name.pdf')\n```\n\n\n### Convert from txt to pdf format.\n```python3\ntxt = txt2pdfConvert(f'{os.getcwd()}/file name.txt', f'{os.getcwd()}/output/file name.pdf')\n```\n\n\n### Merge all pdf files to one pdf file.\n```python3\nall_pdfs_path_tuple = (\n                    f'{os.getcwd()}/file 1.pdf'\n                    , f'{os.getcwd()}/file 2.pdf'\n                    , f'{os.getcwd()}/file 2.pdf'\n                    , f'{os.getcwd()}/file 3.pdf'\n                    , f'{os.getcwd()}/file 4.pdf'\n                    , f'{os.getcwd()}/file 5.pdf'\n                )\nmerged = mergePdfs(*all_pdfs_path_tuple, output_pdf_file_path=f'{os.getcwd()}/output_merged_file.pdf')\n```\n\n\n## License\n[GNU GPLv3](LICENSE)",
    "bugtrack_url": null,
    "license": "GNU GPLv3",
    "summary": "Convert from different file formats to PDF format.",
    "version": "0.3",
    "split_keywords": [
        "ashfaque",
        "ashfaque alam",
        "convert",
        "pdf",
        "convert to pdf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "262fcc5c618ed75000341b4f29eba317",
                "sha256": "beaa76b7222853ff132b2c31cfea9be48eb38cfca9b72a16632e9214d5e4ac9e"
            },
            "downloads": -1,
            "filename": "Convert2PDF-0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "262fcc5c618ed75000341b4f29eba317",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4436,
            "upload_time": "2022-12-24T09:20:05",
            "upload_time_iso_8601": "2022-12-24T09:20:05.786876Z",
            "url": "https://files.pythonhosted.org/packages/05/a6/af128a0b89838e065fc16816c2b6941e56137ecafc4f15ca20e51e5ca940/Convert2PDF-0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-24 09:20:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ashfaque",
    "github_project": "Convert2PDF",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "convert2pdf"
}
        
Elapsed time: 0.03425s