feat: add multi-image to single PDF converter#411
Open
Suhaskumard wants to merge 2 commits into
Open
Conversation
|
@Suhaskumard is attempting to deploy a commit to the Durgeshwar's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
Hi @Durgeshwar-AI, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the enhancements proposed in Issue #317 for the Multi-Image to Single PDF Converter tool.
The update focuses on improving PDF generation efficiency, reducing output file sizes, and providing users with greater control over document formatting. New capabilities include native image embedding, configurable page sizes and margins, image rotation controls, and memory usage optimizations, all while preserving the tool's fully client-side architecture.
Closes #317
Type of Change
Checklist
Demo Video
Recording.2026-06-22.211140111.1.1.mp4
Changes Made
Native PDF Size Optimization
Implemented native image embedding to preserve original image compression and minimize PDF size inflation.
Enhancements include:
Direct JPEG embedding using
pdfDoc.embedJpg()Direct PNG embedding using
pdfDoc.embedPng()Format-specific handling to avoid unnecessary re-encoding
Automatic fallback conversion for unsupported formats:
High-quality JPEG conversion for unsupported formats
Automatic white background handling for transparent images converted to JPEG
Standard Page Sizes & Margin Controls
Added configurable document layout settings.
Supported page formats:
Supported margin presets:
Features include:
Quick Image Rotation
Added image rotation controls directly within the upload workflow.
Capabilities include:
Memory Management Improvements
Optimized image processing to better support large image batches.
Enhancements include:
Files Added
Frontend
Documentation
README.mdFiles Updated
Frontend
frontend/src/pages/ImagePdf.jsxDocumentation
README.mdUser Experience Improvements
Smaller PDF File Sizes
The generated PDF now more closely reflects the original size of uploaded images.
Benefits include:
Professional Document Formatting
Users can now generate standardized PDF documents regardless of image dimensions.
This provides:
Faster Editing Workflow
Users can correct image orientation directly within the converter.
This eliminates:
Improved Performance
Large image batches can be processed more reliably with reduced memory overhead and improved browser stability.
Testing
PDF Optimization Validation
Verified:
Layout & Formatting Validation
Verified:
Rotation Validation
Verified:
Memory & Performance Validation
Verified:
Edge Case Testing
Tested:
Documentation Validation
Updated documentation includes:
Acceptance Criteria
Technical Notes
pdf-libto preserve compression and reduce output file size.