Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PDF417 barcode generation PHP library

NotificationsYou must be signed in to change notification settings

leongrdic/php-pdf417

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

releasephp-versionlicenserun-tests

This is a fork ofpdf417-php library by ihabunek, attempting to keep it's legacy alive as it appears to be the only open source PDF417 generation library for PHP.You can see themain differences below.It has been updated a bit mainly fixing a PHP 8.2 incompatibility issue and merging a few PRs.The idea is to eventually refactor all components and optimize the encoding algorithm.Thus, any contributions are more than welcome!

Requirements

  • PHP 8.0+
  • Extensions:
    • fileinfo
    • bcmath
    • dom
    • gd
    • simplexml (for running tests)

Installation

composer require leongrdic/pdf417

Usage

$pdf417 =new \Le\PDF417\PDF417;$pdf417->setColumns(15);// optionally set the number of columns$pdf417->setSecurityLevel(4);// optionally set the security level$pdf417->setForceBinary();// optionally force binary encoding$content ='Lorem ipsum dolor sit amet.';$data =$pdf417->encode($content);$imageRenderer =new \Le\PDF417\Renderer\ImageRenderer([// below are default values'format' =>'png',// jpg, png, gif, tif, bmp or data-url'quality' =>90,// jpeg quality 1-100'scale' =>3,// elements scale 1-20'ratio' =>3,// height to width aspect 1-10'padding' =>20,// padding in px 0-50'color' =>'#000000',// elements color hex code'bgColor' =>'#ffffff',// background color hex code]);$image = ->render($data)->render($data);$imageinstanceof \Intervention\Image\Image;// true$svgRenderer =new \Le\PDF417\Renderer\SvgRenderer([// below are default values'scale' =>3,// elements scale 1-20'ratio' =>3,// height to width aspect 1-10'color' =>'black',// elements color]);$svg =$svgRenderer->render($data);

Migration fromihabunek/pdf417-php

  • Notable namespace changes
BigFish\PDF417\PDF417                   =>  Le\PDF417\PDF417BigFish\PDF417\Renderers\ImageRenderer  =>  Le\PDF417\Renderer\ImageRendererBigFish\PDF417\Renderers\SvgRenderer    =>  Le\PDF417\Renderer\SvgRenderer
  • Added types to all properties and method parameters and returns

Contributions

Please help this library by testing it and submitting PRs for any fixes or improvement. Thank you!

About

PDF417 barcode generation PHP library

Topics

Resources

Stars

Watchers

Forks

Languages

  • PHP100.0%

[8]ページ先頭

©2009-2025 Movatter.jp