https://github.com/breaking-mind/pypdf2htmlex
a simple python wrapper for the pdf2htmlEX
https://github.com/breaking-mind/pypdf2htmlex
pdf-to-html pdf-wrapper pdf2html pdf2htmlex wrapper-library
Last synced: about 2 months ago
JSON representation
a simple python wrapper for the pdf2htmlEX
- Host: GitHub
- URL: https://github.com/breaking-mind/pypdf2htmlex
- Owner: breaking-mind
- License: mit
- Created: 2024-05-12T17:41:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-18T21:40:44.000Z (over 1 year ago)
- Last Synced: 2025-12-16T14:45:22.752Z (4 months ago)
- Topics: pdf-to-html, pdf-wrapper, pdf2html, pdf2htmlex, wrapper-library
- Language: Python
- Homepage: https://pypi.org/project/pypdf2htmlex/
- Size: 26.4 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PYPDF2HTMLEX
pypdf2htmlex is a Python wrapper for the PDF2HTMLEX (YOU NEED INSTALL THE PDF2HTMLEX IN YOUR PC FOR USE THIS PYTHON LIBRARY)
# Installing
```bash
pip install pypdf2htmlex
```
# Using
## making the HTML file from a pdf
```python
import pypdf2htmlEX
pdf = pypdf2htmlEX.PDF("path-to-my-file.pdf")
pdf.to_html()
# will be generated a html file on folder path-to-my-file
```
## setting drm
can pass True for drm parameter to convert a file to html without restrition
the value is False by default
```python
import pypdf2htmlEX
pdf = pypdf2htmlEX.PDF("path-to-my-file.pdf", drm=True)
pdf.to_html()
```
## making HTML files from dir with various pdf
this code will make html files of all pdf in same folder 'pdfs'
```python
import pypdf2htmlEX
pypdf2htmlEX.dir_to_html(dir_path='pdfs')
```
this code will make html files of all pdf in folder 'pdfs' on folder 'htmls'
```python
import pypdf2htmlEX
pypdf2htmlEX.dir_to_html(dir_path='pdfs', dest_dir='htmls')
```
this code will make html files of all pdf in folder 'pdfs' on folder 'htmls' and every html file will have sequential after the name File, ex: "File_1.html", "File_2.html".
```python
import pypdf2htmlEX
pypdf2htmlEX.dir_to_html(dir_path='pdfs', dest_dir='htmls', new_file_name='File_')
```