Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.42 KB

README.md

File metadata and controls

63 lines (44 loc) · 1.42 KB

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/m-ah07/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!