A simple and efficient web application for converting PDF files to Markdown, built with Next.js and ShadCN UI.
- PDF to Markdown Conversion: Upload one or more PDF files and get a clean Markdown output.
- Drag and Drop Interface: Easily upload files by dragging and dropping them into the application.
- Real-time Preview: View the generated Markdown for each converted file side-by-side with the uploader.
- Individual & Bulk Actions:
- Copy and Download: Copy the Markdown of a single file to your clipboard or download it as a
.mdfile. - Copy and Download All: Concatenate and copy or download all converted Markdown files at once for efficiency.
- Copy and Download: Copy the Markdown of a single file to your clipboard or download it as a
- Responsive Design: A clean and responsive interface that works on all screen sizes.
- Next.js - React framework for building the user interface.
- ShadCN UI - A collection of re-usable components for building the UI.
- @opendocsg/pdf2md - For the core PDF to Markdown conversion logic.
- Tailwind CSS - For styling the application.
- TypeScript - For static typing and improved developer experience.
- Lucide React - For icons.
To get a local copy up and running, follow these simple steps.
Make sure you have Node.js and npm installed on your machine.
- Clone the repo
git clone https://github.com/your_username/xtomd.git
- Navigate to the project directory
cd xtomd - Install NPM packages
npm install
- Run the development server
npm run dev
Open http://localhost:3000 with your browser to see the result.
- Upload Files: Drag and drop your PDF files onto the upload area, or click to select files from your computer.
- Conversion: The files will be automatically processed and converted to Markdown. You can see the status of each file.
- Preview: Once a file is converted, a preview of the Markdown will appear on the right side of the screen.
- Copy/Download:
- For individual files, use the copy and download buttons next to each file name.
- To get all the content at once, use the "Copy All" or "Download All" buttons that appear when multiple files are successfully converted.
For details on how to use the API, please see the API Documentation.
/
├── public/
├── src/
│ ├── app/
│ │ ├── api/pdf-to-md/route.ts # The API endpoint for PDF conversion
│ │ ├── page.tsx # The main page component
│ │ └── layout.tsx # The main layout component
│ ├── components/
│ │ ├── pdf-uploader.tsx # The PDF uploader component
│ │ ├── markdown-preview.tsx # The Markdown preview component
│ │ └── ui/ # ShadCN UI components
│ ├── lib/
│ │ ├── types.ts # TypeScript types
│ │ └── utils.ts # Utility functions
├── package.json
└── README.md
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.