Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soorajvp/pdf-to-html
https://github.com/soorajvp/pdf-to-html
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/soorajvp/pdf-to-html
- Owner: SoorajVp
- Created: 2024-11-08T06:08:57.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-12T06:46:26.000Z (about 1 month ago)
- Last Synced: 2024-11-12T07:30:37.656Z (about 1 month ago)
- Language: JavaScript
- Size: 175 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PDF URL to HTML Converter
This Node.js project converts a PDF document from a URL to an HTML file using the PDF.co API. The output HTML file maintains the structure and design of the original PDF document.
## Requirements
- Node.js
- PDF.co API Key (sign up at [PDF.co](https://pdf.co/) to get an API key)## Setup
1. **Clone the repository** or create a new Node.js project.
2. **Install Dependencies** (if needed): This project uses `https`, `fs`, and `path`, which are built-in Node.js modules, so no external dependencies are required.
3. **Set up your PDF.co API Key** by replacing the placeholder `` with your actual API key.## Configuration
- Open the file and update the following variables:
- `API_KEY`: Set this to your PDF.co API key.
- `SourceFileUrl`: URL of the PDF file you want to convert.
- `DestinationFile`: The path where the output HTML file will be saved.
- `PlainHtml` and `ColumnLayout`: Set to `true` or `false` depending on whether you want plain HTML without CSS or if the document has a column layout (like a newspaper).## Usage
Run the script to start the conversion process:
```bash
git clone https://github.com/SoorajVp/pdf-to-html.gitcd pdf-to-html
node index.js