Skip to content

feat: add batch PDF to PNG conversion with ZIP download#346

Open
Ashvin-KS wants to merge 1 commit into
Durgeshwar-AI:mainfrom
Ashvin-KS:feat/pdf-batch-convert
Open

feat: add batch PDF to PNG conversion with ZIP download#346
Ashvin-KS wants to merge 1 commit into
Durgeshwar-AI:mainfrom
Ashvin-KS:feat/pdf-batch-convert

Conversation

@Ashvin-KS

Copy link
Copy Markdown
Contributor

📄 Pull Request

🔗 Issue Reference

Closes #309


📝 Summary

  • Problem: Users could only convert one PDF to PNG at a time. Bulk workflows (many PDFs) required running the existing tool repeatedly, which was slow and tedious.
  • Solution: Adds a new Batch PDF to PNG tool at /pdf-to-png-batch. Users select (or drag-and-drop) multiple PDF files, choose an image scale, and convert every page of every file to PNG. All results are packaged into a single ZIP download. Each PDF's pages are namespaced into their own sub-folder inside the ZIP.

Changes

  • New file frontend/src/pages/PdfPngBatch.jsx — self-contained batch tool: multi-file selection, queued per-file conversion, per-file + overall progress bars, error handling, and ZIP assembly. Conversion reuses the same pdfjs-dist rendering pipeline as the existing PdfPng.jsx.
  • frontend/src/App.jsx — lazy-loads PdfPngBatch and registers the /pdf-to-png-batch route inside the shared Layout.
  • frontend/src/data/toolsData.jsx — registers the tool in the PDF Tools category (Layers icon, description, path, gradient).

No new dependencies are introduced — jszip, pdfjs-dist, framer-motion, sonner, lucide-react, clsx, and tailwind-merge are all already used elsewhere in the project.


🖼️ Screenshots (if applicable)

Multi-file queue with remove buttons, a scale selector, a "Convert N PDFs" action, and dual progress bars (current file % and overall %), followed by a ZIP download.


✅ Checklist

  • My code follows the project's coding conventions
  • I have tested all impacted features
  • I have updated or added necessary documentation

🔗 Related Issues / PRs


🎓 Open Source Program Participation

Program Name: GSSoC 2026


💬 Additional Notes

  • Files are processed sequentially (as the issue's implementation notes request) to avoid memory spikes from rendering many PDFs concurrently.
  • An overall progress bar is computed from the true total page count across all selected PDFs, so it accurately reflects remaining work.
  • When only a single PDF is queued, its PNGs are placed at the ZIP root (no sub-folder) so the output is identical to a one-off conversion.
  • The image scale selector (1x/2x/3x) lets users trade speed against output quality, matching the existing single-file tool's behaviour.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@Ashvin-KS is attempting to deploy a commit to the Durgeshwar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Durgeshwar-AI

Copy link
Copy Markdown
Owner

@Ashvin-KS please check the current pdf to png and work on it no new tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add batch PDF conversion support for multiple files

2 participants