PHPackages                             fayyaztech/print\_text\_on\_image - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. fayyaztech/print\_text\_on\_image

ActiveLibrary[Image &amp; Media](/categories/media)

fayyaztech/print\_text\_on\_image
=================================

This library will help you to print text and images over images like certificate and id cards sign and barcodes qe codes

1.0.3(3y ago)0401MITPHP

Since Oct 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fayyaztech/print_text_on_image)[ Packagist](https://packagist.org/packages/fayyaztech/print_text_on_image)[ RSS](/packages/fayyaztech-print-text-on-image/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Print text on Image
===================

[](#print-text-on-image)

About
-----

[](#about)

- Anyone can use this library for creating printed certificates and id card banners.
- simple and easy way to implement into your existing project
- currently im not providing multiple color for text only black color available
- Im working on it it will be available soon

installation
------------

[](#installation)

```
composer require fayyaztech/print_text_on_image
```

sample code
-----------

[](#sample-code)

- setContent is an array of classes Text and images
- so you can print multiple text and image on same background
- images like barcode and qr code
- PrintTextOnImagePrintTextOnImage will give you an option to preview | save | download image directly

### configImage params

[](#configimage-params)

```
     * @param String $imagePath image file path
     * @param int $x horizontal place on background image
     * @param int $y vertical place on background image
     * @param int $width image width
     * @param int $height image height
     * @param int $opacity image opacity/visibility
```

### ConfigText

[](#configtext)

```
     * @param String $textContent text you want to print on image
     * @param Int $fontSize font size of that text
     * @param Int $angle rotation of text
     * @param Bool $textHorizontalCenter user can make text center auto by added true parameter
     * @param Int $x horizontal position of text
     * @param Int $y vertical position of text
     * @param $color $color color is black for now we will provide color option soon
     * @param String $font_location custom font if you want other wise default is arial
```

### PrintTextOnImagePrintTextOnImage

[](#printtextonimageprinttextonimage)

```

     * @param String $backgroundImagePath background image file path | remote url not allow | jpeg and png support
     * @param Array $data data should be an array of ConfigText and ConfigImage class
     * @param String $imageOptions download|preview|save
     * @param String $savePath if you want to save file on server directory. provide the path here and $imageOption must be save

```

### Check the code below

[](#check-the-code-below)

```
