This project is a web application designed to convert PDF files into JSON format. Users can upload a PDF, view its content, convert it to JSON, edit the JSON content, and preview the result.
- PDF Upload: Upload a PDF file for conversion.
- PDF Viewer: View the uploaded PDF file.
- Conversion to JSON: Convert the PDF content into structured JSON format.
- JSON Editor: Edit the converted JSON content using a code editor.
- JSON Preview: Preview the JSON content in a formatted view.
- Progress Indicator: Track the conversion progress.
- File Operations: Save the JSON content to a file, clear the editor, and reset the application.
// Handles user input for PDF file selection and reads the file content
// Renders the uploaded PDF file using the @react-pdf-viewer/core library
// Provides an interactive code editor for modifying the JSON content
// Displays a formatted view of the JSON content for easy reading
// Shows the current progress of the PDF to JSON conversion process
// Contains core logic for PDF text extraction, element classification, and JSON generation
// Entry point for the Next.js application, sets up global styles and components
// Main page component that integrates all other components and manages application state
-
Clone the repository:
git clone https://github.com/yourusername/pdf-to-json-converter.git
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:3000
- Upload a PDF file using the file input.
- Click "Convert to JSON" to process the PDF.
- Edit the resulting JSON in the editor if needed.
- Use the "Preview JSON" button to see a formatted view.
- Save the JSON content to a file using the "Save JSON" button.
This project is licensed under the MIT License - see the LICENSE file for details.