irongit
pdftohtml/README.md
43 lines1.7 KBMarkdown
1# HTML to PDF
2
3[Demo]https://d3dd960wsxubj7.cloudfront.net/
4
5## Description
6
7This project allows you to upload a PDF file, view the PDF rendered as an image on the page, and see its content converted into HTML. It leverages `pdf.js` for rendering the PDF and extracting text to display it in HTML format.
8
9### Features:
10
11- **Upload PDF**: Users can upload a PDF file.
12- **Render PDF as Image**: The PDF is rendered as an image on the canvas, allowing users to view the PDF content.
13- **PDF to HTML Conversion**: The text content of the PDF is extracted and displayed in HTML format. This is done in the browser with no api calls.
14
15## Progress
16
17- **Uploaded PDF File**: The user can select and upload a PDF file.
18- **Rendered as Image**: The PDF is displayed as an image using the `pdf.js` library, rendered to a `<canvas>`.
19- **HTML Conversion**: The text content from the PDF is extracted and displayed on the webpage using HTML elements.
20
21## TODO
22
231. **Implement Drag-and-Drop Upload**: Allow users to drag and drop the PDF file to upload it.
242. **View Multiple Pages**: Implement functionality to navigate between different pages of the PDF and render them as images.
253. **PDF to HTML Conversion**: Complete the PDF-to-HTML conversion process by ensuring text is displayed accurately with proper formatting.
26
27## Installation
28
29### Prerequisites
30
31- Ensure you have a modern web browser that supports HTML5 and JavaScript.
32- No server-side installation is required; this project is client-side only.
33
34### Steps to Run:
35
361. Clone the repository (if applicable):
37 ```bash
38 git clone https://github.com/huncholane/pdftohtml.git
39 ```
402. Open the html file or run with a server like
41 ```bash
42 python3 -m http.server 9000
43 ```