Download the PHP package baidouabdellah/laravel-arpdf without Composer
On this page you can find all versions of the php package baidouabdellah/laravel-arpdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download baidouabdellah/laravel-arpdf
More information about baidouabdellah/laravel-arpdf
Files in baidouabdellah/laravel-arpdf
Package laravel-arpdf
Short Description A Laravel package for generating PDF files with Full support Arabic languages.
License MIT
Homepage https://github.com/baidou5/laravel-arpdf
Informations about the package laravel-arpdf
Laravel ArPDF
A Laravel package for generating PDF files with support for both English and Arabic languages without relying on external libraries.
Installation
To install the laravel-arpdf
package, follow these steps:
-
Add the package to your Laravel project using Composer:
-
Register the Service Provider (if using Laravel < 5.5):
In your
config/app.php
file, add the following line to theproviders
array: -
Publish the configuration file (optional):
You can publish the configuration file to customize the package settings:
Usage
To use the package, you can access the PDF generation functionality in your controller:
Demo Controller
Generating a PDF
Here’s an example of how to generate a simple PDF:
Customizing Arabic Font
If you need to customize the Arabic font used in the PDFs, follow these steps:
-
Add the Arabic font files: Place your Arabic font files (e.g., TTF or OTF) in the
resources/fonts
directory of your Laravel project. -
Configure the font in your code: In your PDF generation code, you can specify the font like this:
-
Ensure the font supports Arabic characters: Make sure the font you are using supports Arabic characters to display them correctly in the PDF.
- Example of setting the Arabic font: Here’s an example of how to set an Arabic font in your PDF:
Support
If you encounter any issues, please open an issue on the GitHub repository.
- Abdellah Baidou
- Phone: +212 661-176711
- Email: [email protected]
License
This package is licensed under the MIT License. See the LICENSE file for more information.