承接 fayyaztech/print_text_on_image 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fayyaztech/print_text_on_image

最新稳定版本:1.0.3

Composer 安装命令:

composer require 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

README 文档

README

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

composer require fayyaztech/print_text_on_image

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

     * @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

     * @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

 
     * @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

<?php

require_once 'vendor/autoload.php';

use Fayyaztech\PrintTextOnImage\ConfigImage;
use Fayyaztech\PrintTextOnImage\ConfigText;
use Fayyaztech\PrintTextOnImage\PrintTextOnImage as PrintTextOnImagePrintTextOnImage;

$setContent = [
    new ConfigText('Text on image', 30, 60, 30,0,true),
    new ConfigText('this is 2nd text', 30, 100, 10),
    new ConfigImage('php.png', 150, 100, 60, 30, 70),
];


$test = new PrintTextOnImagePrintTextOnImage('./white.png', $setContent, 'preview');
$test->generate();

Special Thanks to

Text Center over background image

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-07