pypdfops


Namepypdfops JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/Nitesh-13/PyPDFOps
SummaryA utility library for pdf manupulation
upload_time2024-03-07 07:10:16
maintainer
docs_urlNone
authorNitesh (limelight)
requires_python
license
keywords python pdf compress pdf to pptx pdf to doc merge pdf split pdf pdf to image
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PyPdfOps: Python PDF Operations Library
=======================================

PyPdfOps is a Python library that simplifies the manipulation of PDF files. It provides a set of methods for common PDF operations, including compression, conversion to different formats (pptx, images, doc), splitting, and merging. With PyPdfOps, you can streamline your PDF-related tasks in your Python projects.

### Check out the library on PYPI
[PyPDFOps PYPI Repository](https://pypi.org/project/pypdfops/)

Installation
------------

    pip install pypdfops
    

Usage
-----

### 1\. PDF Compression

For compressing pdf, PDFNet sdk is used and a token is required to use the compressing feature. To obtain a demo token, head to 'https://dev.apryse.com/get-key', after signin, choose web and get the trial key.

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf"
output_pdf = "compressed_output.pdf"
pdf = PDFOps(token = "COMPRESSION_TOKEN") # Token for compression
pdf.compress_pdf(input_pdf, output_pdf)
```
    

### 2\. PDF to PPTX Conversion

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf"
output_pptx = "converted_pdf.pptx"
pdf = PDFOps()
pdf.convert_to_pptx(input_pdf, output_pptx)
```
        
    

### 3\. PDF to Images Conversion

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf"
output_folder = "Images"
pdf = PDFOps()
pdf.extract_pages_as_images(input_pdf, output_folder)
```
        
    

### 4\. PDF to DOC Conversion

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf"
output_doc = "converted_pdf.doc"
pdf = PDFOps()
pdf.convert_to_doc(input_pdf, output_doc)
```
        
    

### 5\. PDF Splitting

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf"
output_folder = "SplittedPdfs"
pages_to_split = [[1,2],[3,5]]
pdf = PDFOps()
pdf.split_pdf(input_pdf, output_folder,pages_to_split)
```
        
    

### 6\. PDF Merging

```python
from pypdfops import PDFOps 
input_pdfs = [
    "input1.pdf",
    "input2.pdf",
    "input3.pdf"
]
output_pdf = "Merged.pdf"
pdf = PDFOps()
pdf.merge_pdfs(input_pdfs, output_pdf)
```



### 7\. PDF Encryption

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf
output_pdf = "encrypted.pdf"
password = "12345678"
pdf = PDFOps()
pdf.encrypt_pdf(input_pdf, output_pdf, password)
```


### 8\. PDF Decryption

```python
from pypdfops import PDFOps 
input_pdf = "input.pdf
output_pdf = "decrypted.pdf"
password = "12345678"
pdf = PDFOps()
pdf.decrypt_pdf(input_pdf, output_pdf, password)
```
    

Feel free to customize the examples and add more details to suit your specific use cases.

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Nitesh-13/PyPDFOps",
    "name": "pypdfops",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,pdf,compress,pdf to pptx,pdf to doc,merge pdf,split pdf,pdf to image",
    "author": "Nitesh (limelight)",
    "author_email": "<ritu10mali@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3d/1f/e744d49d18d683c866a890ee930f6d2a73a0c06c580883e9a18379db81f7/pypdfops-0.0.3.tar.gz",
    "platform": null,
    "description": "PyPdfOps: Python PDF Operations Library\n=======================================\n\nPyPdfOps is a Python library that simplifies the manipulation of PDF files. It provides a set of methods for common PDF operations, including compression, conversion to different formats (pptx, images, doc), splitting, and merging. With PyPdfOps, you can streamline your PDF-related tasks in your Python projects.\n\n### Check out the library on PYPI\n[PyPDFOps PYPI Repository](https://pypi.org/project/pypdfops/)\n\nInstallation\n------------\n\n    pip install pypdfops\n    \n\nUsage\n-----\n\n### 1\\. PDF Compression\n\nFor compressing pdf, PDFNet sdk is used and a token is required to use the compressing feature. To obtain a demo token, head to 'https://dev.apryse.com/get-key', after signin, choose web and get the trial key.\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\"\noutput_pdf = \"compressed_output.pdf\"\npdf = PDFOps(token = \"COMPRESSION_TOKEN\") # Token for compression\npdf.compress_pdf(input_pdf, output_pdf)\n```\n    \n\n### 2\\. PDF to PPTX Conversion\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\"\noutput_pptx = \"converted_pdf.pptx\"\npdf = PDFOps()\npdf.convert_to_pptx(input_pdf, output_pptx)\n```\n        \n    \n\n### 3\\. PDF to Images Conversion\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\"\noutput_folder = \"Images\"\npdf = PDFOps()\npdf.extract_pages_as_images(input_pdf, output_folder)\n```\n        \n    \n\n### 4\\. PDF to DOC Conversion\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\"\noutput_doc = \"converted_pdf.doc\"\npdf = PDFOps()\npdf.convert_to_doc(input_pdf, output_doc)\n```\n        \n    \n\n### 5\\. PDF Splitting\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\"\noutput_folder = \"SplittedPdfs\"\npages_to_split = [[1,2],[3,5]]\npdf = PDFOps()\npdf.split_pdf(input_pdf, output_folder,pages_to_split)\n```\n        \n    \n\n### 6\\. PDF Merging\n\n```python\nfrom pypdfops import PDFOps \ninput_pdfs = [\n    \"input1.pdf\",\n    \"input2.pdf\",\n    \"input3.pdf\"\n]\noutput_pdf = \"Merged.pdf\"\npdf = PDFOps()\npdf.merge_pdfs(input_pdfs, output_pdf)\n```\n\n\n\n### 7\\. PDF Encryption\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\noutput_pdf = \"encrypted.pdf\"\npassword = \"12345678\"\npdf = PDFOps()\npdf.encrypt_pdf(input_pdf, output_pdf, password)\n```\n\n\n### 8\\. PDF Decryption\n\n```python\nfrom pypdfops import PDFOps \ninput_pdf = \"input.pdf\noutput_pdf = \"decrypted.pdf\"\npassword = \"12345678\"\npdf = PDFOps()\npdf.decrypt_pdf(input_pdf, output_pdf, password)\n```\n    \n\nFeel free to customize the examples and add more details to suit your specific use cases.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A utility library for pdf manupulation",
    "version": "0.0.3",
    "project_urls": {
        "Bug Reports": "https://github.com/Nitesh-13/PyPDFOps/issues",
        "Homepage": "https://github.com/Nitesh-13/PyPDFOps",
        "Source": "https://github.com/Nitesh-13/PyPDFOps"
    },
    "split_keywords": [
        "python",
        "pdf",
        "compress",
        "pdf to pptx",
        "pdf to doc",
        "merge pdf",
        "split pdf",
        "pdf to image"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35696712a28d508a1a035d85d8077278fa2d3230fae554f02dce149bc06d6daa",
                "md5": "b3908edc937eb8afc52c345a0602a25f",
                "sha256": "9768259de11eb4687a52f86d01a3d4579ce5b59255d1042975ff0b465ab6af20"
            },
            "downloads": -1,
            "filename": "pypdfops-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3908edc937eb8afc52c345a0602a25f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5250,
            "upload_time": "2024-03-07T07:10:14",
            "upload_time_iso_8601": "2024-03-07T07:10:14.957074Z",
            "url": "https://files.pythonhosted.org/packages/35/69/6712a28d508a1a035d85d8077278fa2d3230fae554f02dce149bc06d6daa/pypdfops-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d1fe744d49d18d683c866a890ee930f6d2a73a0c06c580883e9a18379db81f7",
                "md5": "cabe421bf23e549d87d5082b7145170e",
                "sha256": "a6e84927c56424786ec2ffa0a36d645f731d5d849a6f1eb4bf30b014002716b7"
            },
            "downloads": -1,
            "filename": "pypdfops-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cabe421bf23e549d87d5082b7145170e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5062,
            "upload_time": "2024-03-07T07:10:16",
            "upload_time_iso_8601": "2024-03-07T07:10:16.941871Z",
            "url": "https://files.pythonhosted.org/packages/3d/1f/e744d49d18d683c866a890ee930f6d2a73a0c06c580883e9a18379db81f7/pypdfops-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 07:10:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nitesh-13",
    "github_project": "PyPDFOps",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pypdfops"
}
        
Elapsed time: 3.95700s