A browser-based tool that analyzes PDF files to detect page size, DPI, orientation, and print suitability. Built with pdf.js and Tailwind CSS.
- 📄 PDF Analysis: Load and analyze any PDF file directly in your browser
- 📏 Multiple Units: Display page dimensions in pixels, points, inches, and millimeters
- 🎯 DPI Detection: Calculate horizontal, vertical, and average DPI for each page
- 🔄 Orientation Detection: Automatically detect Portrait, Landscape, or Square orientation
⚠️ Print Warnings: Get warnings for pages with low DPI (< 300 DPI for printing)- ✅ Quality Indicators: Visual indicators for high-quality (600+ DPI), print-ready, and low-quality pages
- 🎨 Clean UI: Modern, responsive interface built with Tailwind CSS
- 📊 Summary Statistics: Quick overview of total pages, print-ready pages, and low DPI warnings
- Open
index.htmlin a modern web browser (Chrome, Firefox, Safari, Edge) - Click the upload area or drag and drop a PDF file
- View the analysis results for each page
Simply open the index.html file in your browser - no build process required!
# Clone the repository
git clone https://github.com/BaseMax/pdf-page-dpi-analyzer.git
cd pdf-page-dpi-analyzer
# Open in browser
open index.html # macOS
# or
start index.html # Windows
# or
xdg-open index.html # LinuxNote: This tool requires an internet connection to load the pdf.js library from CDN. Make sure you're online when you open the page.
For better development experience, you can use a local server:
# Python 3
python -m http.server 8000
# Node.js
npx http-server
# Then open http://localhost:8000 in your browserThe tool uses pdf.js to:
- Load and parse PDF files in the browser
- Extract page dimensions in PDF points (1 point = 1/72 inch)
- Convert dimensions to multiple units (mm, inches, pixels)
- Calculate DPI based on page dimensions
- Determine page orientation
- Assess print suitability based on DPI thresholds
- Low Quality (< 300 DPI): Not recommended for printing
- Print Ready (300-599 DPI): Minimum acceptable quality for printing
- High Quality (600+ DPI): Recommended for professional printing
- pdf.js - PDF rendering and parsing
- Tailwind CSS - Styling and UI components
- Vanilla JavaScript - No framework dependencies
Works in all modern browsers that support:
- File API
- ArrayBuffer
- Async/Await
- ES6+ JavaScript
MIT License - see LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.

