A modern, browser-based tool to upload a PDF and analyze comprehensive page dimensions with professional features and a beautiful, responsive interface. Detect page sizes in pixels, points, inches, millimeters, and centimeters, along with orientation, aspect ratio, and standard paper format matching.
This project uses HTML, CSS, JavaScript, and PDF.js to run entirely in the browser with no backend required.
- Drag-and-drop support - Simply drag PDF files into the browser
- File information display - Shows filename, file size, and total pages
- Real-time analysis - Instant processing with loading indicator
- Multi-page support - Analyzes every page individually
Report sizes in multiple units:
- Pixels (px) - Screen/digital dimensions
- Points (pt) - PDF native unit (1/72 inch)
- Inches (in) - Imperial measurement
- Millimeters (mm) - Metric measurement
- Centimeters (cm) - Metric measurement
- Page orientation detection - Portrait, Landscape, or Square
- Aspect ratio calculation - Shows width:height ratio for each page
- Paper size matching - Identifies standard formats (A-series, Letter, Legal, Tabloid)
- Uniformity detection - Indicates if all pages have the same dimensions
- Statistics summary - Min/max dimensions, most common size, orientation counts
- Export to CSV - Download analysis results in spreadsheet format
- Export to JSON - Get structured data for developers
- Copy to clipboard - Quick copy of results for sharing
- Beautiful gradient design - Eye-catching purple/blue gradient theme
- Card-based layout - Clean, organized information display
- SVG icons - Crisp, scalable vector graphics
- Smooth animations - Polished transitions and hover effects
- Fully responsive - Perfect on mobile, tablet, and desktop
- Professional table design - Easy-to-read data presentation
Deploy on GitHub Pages or any static hosting provider for instant access.
This tool runs entirely in the browser. There are no build tools or backend servers required. You only need:
- A modern web browser (Chrome, Firefox, Edge, Safari)
- The project files
-
Clone the repository:
git clone https://github.com/BaseMax/pdf-page-size-inspector.git cd pdf-page-size-inspector -
Open
index.htmlin your browser, or serve it using any static web server:# Using Python python -m http.server 8080 # Using Node.js npx serve
-
Navigate to
http://localhost:8080in your browser.
Alternatively, you can deploy it on GitHub Pages or any static hosting provider like Netlify or Vercel.
- Open the app in your browser
- Drag and drop a PDF file into the drop zone, or click browse to select a file
- Wait for the analysis to complete (loading spinner will appear)
- View comprehensive results including:
- File information (name, size, page count)
- Detailed page dimensions in all units
- Orientation and aspect ratio for each page
- Paper size identification
- Statistical summary
- CSV Export: Click "Export CSV" to download a spreadsheet with all measurements
- JSON Export: Click "Export JSON" to get structured data for programmatic use
- Copy Results: Click "Copy Results" to copy a text summary to your clipboard
- Green summary bar: All pages have uniform dimensions
- Yellow summary bar: PDF contains pages with varying sizes
- Statistics section: Shows dimension ranges, most common paper size, and orientation counts
The application automatically identifies these standard paper formats:
- A0 - 841 Γ 1189 mm (33.1 Γ 46.8 in)
- A1 - 594 Γ 841 mm (23.4 Γ 33.1 in)
- A2 - 420 Γ 594 mm (16.5 Γ 23.4 in)
- A3 - 297 Γ 420 mm (11.7 Γ 16.5 in)
- A4 - 210 Γ 297 mm (8.3 Γ 11.7 in)
- A5 - 148 Γ 210 mm (5.8 Γ 8.3 in)
- A6 - 105 Γ 148 mm (4.1 Γ 5.8 in)
- Letter - 216 Γ 279 mm (8.5 Γ 11 in)
- Legal - 216 Γ 356 mm (8.5 Γ 14 in)
- Tabloid - 279 Γ 432 mm (11 Γ 17 in)
Pages that don't match standard formats are marked as Custom.
pdf-page-size-inspector/
βββ index.html # Main HTML interface with semantic structure
βββ style.css # Modern CSS with responsive design
βββ script.js # Analysis logic and interactive features
βββ pdf.min.js # PDF.js library (Mozilla)
βββ pdf.worker.min.js # PDF.js web worker
βββ .gitignore # Git ignore patterns
βββ LICENSE # MIT License
βββ README.md # This file
- HTML5 - Semantic structure with accessibility in mind
- CSS3 - Modern responsive design with CSS Grid and Flexbox
- Vanilla JavaScript - No framework dependencies, pure ES6+
- PDF.js (Mozilla) - Industry-standard PDF parsing and rendering
- SVG Icons - Crisp, scalable vector graphics
- CSS Custom Properties - Dynamic theming with CSS variables
- CSS Grid & Flexbox - Responsive layouts that adapt to any screen
- Async/Await - Modern asynchronous JavaScript
- File API - Browser-native file handling
- Clipboard API - One-click copy functionality
- Drag and Drop API - Intuitive file upload experience
Contributions are welcome! Here are some ways you can contribute:
- π Fix bugs or improve error handling
- π¨ Enhance UI/UX with new features or improvements
- π Add support for additional paper formats
- π Add internationalization (i18n) support
- β‘ Performance optimizations
- π± PWA (Progressive Web App) support
- π Security improvements
- π Documentation improvements
- βΏ Accessibility enhancements
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Test thoroughly across different browsers and devices
- Commit your changes
git commit -m 'Add some amazing feature' - Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
Please ensure your code follows the existing style and includes appropriate comments.
- β¨ Complete UI/UX redesign with modern gradient theme
- π±οΈ Drag-and-drop file upload support
- π Statistics dashboard with detailed metrics
- π Added Points (pt) and Inches (in) measurements
- π Orientation detection (Portrait/Landscape/Square)
- π Aspect ratio calculation
- πΎ Export to CSV and JSON formats
- π Copy results to clipboard
- π± Fully responsive design for all devices
- π¨ SVG icons throughout the interface
- β‘ Loading spinner and better user feedback
- π File information display (name, size, pages)
- π Enhanced statistics (min/max, most common size, orientation counts)
- Basic PDF page size detection
- Support for multiple measurement units
- Standard paper size matching
- Simple table display
This project is released under the MIT License.
Copyright 2025, Seyyed Ali Mohammadiyeh (Max Base)
- PDF.js by Mozilla - Excellent PDF rendering library
- Contributors - Thank you to all who have contributed to this project
- Author: Seyyed Ali Mohammadiyeh (Max Base)
- GitHub: @BaseMax
- Repository: pdf-page-size-inspector
Found a bug or have a feature request? Open an issue on GitHub!
Made with β€οΈ by Max Base


