Note: This project was created using Google AI Studio with the Gemini 3 Pro model.
MinerU Visualizer is a web-based tool designed to visualize layout analysis results on PDF documents. It allows users to overlay bounding boxes from a JSON parser output (specifically formatted for MinerU/Magic-PDF) onto the original PDF document to inspect detection accuracy and structure.
- PDF & JSON Upload: Upload a PDF file and its corresponding JSON analysis result.
- Layout Visualization: Overlays colored bounding boxes for different content types (Text, Title, Table, Image, Formula, etc.).
- Interactive Inspection: Click on any bounding box to view detailed information, including coordinates, raw content, and HTML representation (for tables).
- Layer Control: Toggle visibility for specific content types to focus on specific elements.
- Zoom & Navigation: Standard PDF navigation tools including zoom in/out.
- Open the application in your browser.
- Upload PDF: Click on the first upload box to select your source PDF document.
- Upload JSON: Click on the second upload box to select the parsing result JSON file.
- The tool supports the standard
pdf_infoJSON format produced by layout analysis tools.
- The tool supports the standard
- The PDF will render in the main view with overlays.
- Use the sidebar to toggle layers or inspect specific blocks.
The tool expects a JSON structure similar to:
{
"pdf_info": [
{
"page_idx": 0,
"page_size": [595, 842],
"para_blocks": [
{
"type": "text",
"bbox": [50, 100, 500, 120],
"lines": [...]
},
...
]
},
...
]
}- React: UI Framework.
- react-pdf: For rendering PDF documents.
- Tailwind CSS: For styling.
- Lucide React: For icons.
This application is designed with privacy in mind. All file processing and visualization happens locally in your browser:
- No Cloud Uploads: Files you upload (PDF and JSON) never leave your device. They are processed entirely client-side using the browser's FileReader API.
- Local Rendering: PDF rendering is handled locally by PDF.js.
- No External APIs: The application does not make any API calls to external services for processing your documents.
- Offline Capable: Once loaded, the application works offline (except for initial loading of UI libraries from CDN).
The only external resources loaded are standard frontend libraries (Tailwind CSS, fonts, React, and PDF.js worker) which are typical for modern web applications and do not have access to your uploaded files.
MIT