pdf
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
index.ts
https://pro909--12546220375711f089fc9e149126039e.web.val.run
A comprehensive web application for PDF manipulation and conversion operations.
- Merge PDFs: Combine multiple PDF files into one
- Split PDF: Extract specific pages or split into separate files
- PDF to Images: Convert PDF pages to PNG/JPG images
- Images to PDF: Convert images to PDF format
- Compress PDF: Reduce PDF file size
- Add Watermark: Add text or image watermarks
- Extract Text: Extract text content from PDFs
- Rotate Pages: Rotate PDF pages
- Add Password: Protect PDFs with passwords
- Remove Password: Remove password protection
- Frontend: React with TypeScript, TailwindCSS
- Backend: Hono API framework
- PDF Processing: PDF-lib library
- File Handling: Browser File API
βββ backend/
β βββ index.ts # Main API server
β βββ routes/
β βββ merge.ts # PDF merging
β βββ split.ts # PDF splitting
β βββ convert.ts # Format conversion
β βββ compress.ts # PDF compression
β βββ utils.ts # Shared utilities
βββ frontend/
β βββ index.html # Main HTML template
β βββ index.tsx # React app entry point
β βββ components/
β β βββ App.tsx # Main app component
β β βββ FileUpload.tsx # File upload component
β β βββ ToolSelector.tsx # Tool selection
β β βββ ProcessingArea.tsx # Processing interface
β βββ style.css # Custom styles
βββ shared/
βββ types.ts # Shared TypeScript types
- Select a PDF operation from the tool menu
- Upload your PDF file(s) or images
- Configure operation settings
- Process and download the result
POST /api/merge
- Merge multiple PDFsPOST /api/split
- Split PDF into pagesPOST /api/convert
- Convert between formatsPOST /api/compress
- Compress PDF filePOST /api/watermark
- Add watermark to PDFPOST /api/extract-text
- Extract text from PDFPOST /api/rotate
- Rotate PDF pagesPOST /api/protect
- Add password protectionPOST /api/unlock
- Remove password protection