Metadata-Version: 2.1
Name: pypdfops
Version: 0.0.2
Summary: A utility library for pdf manupulation
Home-page: https://github.com/Nitesh-13/PyPDFOps
Author: Nitesh (limelight)
Author-email: <ritu10mali@gmail.com>
Project-URL: Bug Reports, https://github.com/Nitesh-13/PyPDFOps/issues
Project-URL: Source, https://github.com/Nitesh-13/PyPDFOps
Keywords: python,pdf,compress,pdf to pptx,pdf to doc,merge pdf,split pdf,pdf to image
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: pdf2docx
Requires-Dist: pdf2image
Requires-Dist: pdf2pptx
Requires-Dist: PDFNetPython3
Requires-Dist: PyMuPDF
Requires-Dist: PyPDF2

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.

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)
```
        
    

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/)
