Skip to content

A simple PHP project for merging multiple images into a single PDF file. This project uses the FPDF library to handle PDF generation.

License

Notifications You must be signed in to change notification settings

marwan-ahmed-23/Merge-Images-to-PDF-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merge Images to PDF (php)

A simple PHP project for merging multiple images into a single PDF file. This project uses the FPDF library to handle PDF generation.

✨ Features

  • Supports multiple image formats (JPEG, PNG, etc.).
  • Dynamically adjusts images to fit within the PDF page.

⚙️ Requirements

📖 Installation

Clone the repository and install the required dependencies:

git clone https://github.com/marwan-ahmed-23/Merge-Images-to-PDF-php.git
cd merge-images-to-pdf
composer install

🚀 Usage

Here's an example of how to use the project:

require_once __DIR__ . '/src/MergeImagesToPdf.php';

use MergeImages\MergeImagesToPdf;

$images = [
    'path/to/image1.jpg',
    'path/to/image2.jpg',
];

$outputPath = 'output/merged.pdf';

$merger = new MergeImagesToPdf();
$merger->merge($images, $outputPath);

echo "PDF successfully created at: {$outputPath}";

📂 Folder Structure

merge-images-to-pdf/ 
├── examples/
│   └── example.php
├── src/
│   └── MergeImagesToPdf.php
├── LICENSE
├── .gitignore
└── README.md

🤝 Contributing

Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.

🌟 Show Your Support

If you found this project helpful, please consider giving it a ⭐ on GitHub. Your support means the world to us!

About

A simple PHP project for merging multiple images into a single PDF file. This project uses the FPDF library to handle PDF generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages