File size: 1,312 Bytes
4a5a856 d1aa69e 4a5a856 d1aa69e 4a5a856 d1aa69e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
---
title: pdf2html
app_file: web_interface.py
sdk: gradio
sdk_version: 5.20.1
---
# pdf2html
PDF ํ์ผ์ ๋จ์ผ ์ปฌ๋ผ HTML๋ก ๋ณํํ๋ Python ํจํค์ง์
๋๋ค.
## ์ค์น
```bash
# Poetry๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ
poetry install
# ๋๋ pip ์ฌ์ฉ
pip install pdf2html
```
## ํ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
```bash
pip install PyMuPDF beautifulsoup4 langchain gradio gradio-pdf
```
## ์ฌ์ฉ๋ฒ
### ๋ช
๋ น์ค ์ธํฐํ์ด์ค
```bash
# ์ง์ ์คํ
poerty run python -m pdf2html ๊ฒฝ๋ก/ํ์ผ๋ช
.pdf
poerty run python -m pdf2html ๊ฒฝ๋ก/ํ์ผ๋ช
.pdf --output ์ถ๋ ฅ๋๋ ํ ๋ฆฌ
# ์ค์น ํ ์คํ
pdf2html ๊ฒฝ๋ก/ํ์ผ๋ช
.pdf
pdf2html ๊ฒฝ๋ก/ํ์ผ๋ช
.pdf --output ์ถ๋ ฅ๋๋ ํ ๋ฆฌ
```
### ์น ์ธํฐํ์ด์ค
```bash
# ์ง์ ์คํ
poetry run python -m web_interface
# ์ค์น ํ ์คํ
pdf2html-web
```
### Python ์ฝ๋์์ ์ฌ์ฉ
```python
from pdf2html import PDFToHTMLConverter
converter = PDFToHTMLConverter("๊ฒฝ๋ก/ํ์ผ๋ช
.pdf")
output_path = converter.convert()
print(f"๋ณํ ์๋ฃ: {output_path}")
```
## ์ฃผ์ ๊ธฐ๋ฅ
- PDF ๋ฌธ์์ ํ
์คํธ, ์ด๋ฏธ์ง, ํ ์ถ์ถ
- 1๋จ ์ธ๋ก ๋ ์ด์์์ผ๋ก ์ฌ๊ตฌ์ฑ
- ๋ฌธ๋จ ๊ตฌ์กฐ ๋ฐ ์์ ์ ์ง
- ์ด๋ฏธ์ง ์๋ ์ถ์ถ ๋ฐ ํฌํจ
- ํ ๊ตฌ์กฐ ๊ฐ์ง ๋ฐ HTML ํ
์ด๋ธ๋ก ๋ณํ
- Gradio ๊ธฐ๋ฐ ์น ์ธํฐํ์ด์ค ์ ๊ณต |