A client-side PDF table extractor built with Svelte, TypeScript, and Tailwind CSS. Upload PDF files, preview them in a modal, and extract tables to CSV format - all in your browser without any backend.
Features
- 📄 PDF Upload: Simple file upload form for PDF documents
- 👁️ PDF Preview: View uploaded PDFs in a modal dialog
- 📊 Table Extraction: Extract tables from PDF files
- 💾 CSV Export: Convert extracted tables to CSV format
- 🖥️ Client-Side Only: No backend or server required - everything runs in your browser
- 🎨 Tailwind CSS: Beautiful, responsive UI
Tech Stack
- SvelteKit - Web framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- PDF.js - PDF parsing and rendering
- PapaParse - CSV generation
Getting Started
Prerequisites
- Node.js (v18 or higher recommended)
- npm, pnpm, or yarn
Installation
Clone the repository:
git clone https://github.com/emnopal/pdf-extractor-svelte.git
cd pdf-extractor-svelte
Install dependencies:
npm install
Development
Start the development server:
npm run dev
Or open the app in a new browser tab:
npm run dev -- --open
Building
To create a production version:
npm run build
Preview the production build:
npm run preview
Usage
- Open the application in your browser
- Click "Choose File" and select a PDF file
- The PDF will open in a modal with a preview
- Click "Convert to CSV" to extract tables and download as CSV
- Click the X button or "Close" to close the modal and clear the PDF from memory
Type Checking
Run type checking:
npm run check
Watch mode for type checking:
npm run check:watch
License
This project is open source and available under the MIT License.
Deployment
To deploy your app, you may need to install an adapter for your target environment.
For static hosting (since this is a client-side app), use @sveltejs/adapter-static.