A simple React app that downloads an image from the internet and automatically generates a PDF and Excel file with the embedded image.
- 🖼️ Download random images from the internet
- 📄 Generate PDF with embedded image
- 📊 Generate Excel with embedded image
- 💾 Direct download of generated files
- 🎨 Modern and intuitive interface
- Clone the repository
- Install dependencies:
npm run install-all- Start the application:
npm start-
Open your browser at
http://localhost:3000 -
Click "Generate Documents" to:
- Download a random image
- Generate a PDF with the image
- Generate an Excel with the image
- Download all generated files
- React 18
- Axios for HTTP requests
- Modern CSS with gradients
- Node.js with Express
- Sharp for image manipulation
- jsPDF for PDF generation
- ExcelJS for Excel generation
- Axios for image downloading
├── client/ # React Frontend
│ ├── public/
│ ├── src/
│ │ ├── App.js
│ │ ├── App.css
│ │ ├── index.js
│ │ └── index.css
│ └── package.json
├── server/ # Node.js Backend
│ ├── index.js
│ └── downloads/ # Generated files
├── package.json
└── README.md
POST /api/generate-documents- Generate PDF and Excel with imageGET /api/download/:filename- Download generated filesGET /downloads/:filename- Static access to files
- The app uses random images from Picsum (https://picsum.photos/)
- Files are saved in the
server/downloads/folder - Generated documents include the embedded image, not just the link