Download the PHP package mojahed/eduplusqr without Composer

On this page you can find all versions of the php package mojahed/eduplusqr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eduplusqr

EduplusQR PHP SDK

Fast QR code and barcode generation for PHP 7.4+, powered by the standalone EduplusQR binary. You get PNG, SVG or PDF output, 15 code types, logos and styles, Wi-Fi, vCard and payment content, and batches with in-memory images, files, a ZIP or printable label sheets. It needs no GD, Imagick or any other PHP extension.

Using Laravel? Use eduplus/qr instead. It has the same API plus config, an install command and a health check.

Contents

Installation

The package doesn't bundle the binary (that used to add about 15 MB to every project). Install it once per server:

The binary is found automatically. The package looks for the file named for your machine (EduplusQR-linux-amd64, EduplusQR-linux-arm64, EduplusQR-darwin-arm64, EduplusQR-windows-amd64.exe, …) or a plain EduplusQR, in this order:

  1. QrCode::configure(['binary' => '/full/path'])
  2. the EDUPLUS_QR_BINARY environment variable
  3. your project's bin/ folder, which works on shared hosting: upload the binary there. A missing execute bit is fixed automatically when PHP may chmod.
  4. /usr/local/bin, /usr/bin, /opt/eduplus and PATH

Old EduplusQR binaries (from SDK 1.0.1) are skipped automatically. Check what's used:

PHP needs proc_open(), which is enabled by default.

Single codes

Supported types (QrCode::types()): qr, code128, gs1-128, code39, code93, codabar, itf, itf14, 2of5, ean13, ean8, upca, datamatrix, pdf417, aztec.

Getting the output

Method Returns Writes a file
save($path) Result (path, width, height, sha256, …) yes (.png, .svg or .pdf; folders are created)
toPng(), toSvg(), toPdf(), toString($format) raw bytes no
toBase64($format = null) base64 string no
toDataUri($format = null) data:image/png;base64,... no
generateInMemory($format = null) Result with base64(), dataUri(), contents() no
send($format = null, $downloadName = null) sends headers and the image to the browser no
validate() / isValid() Result / bool no (checks only)

Use absolute paths with save() (for example __DIR__ . '/...').

Options

Every method returns the code, so you can chain them:

Method Purpose
type($t) Code type
ecc($level) QR L/M/Q/H, PDF417 0-8, Aztec 5-95 (%)
module($px) / xdim($mm) / dpi($dpi) Module size in pixels, or in millimetres for print
size($w, $h = null), width($px), height($px) Exact image size; the module size is fitted to it
quiet($modules), margin($px) Quiet zone (0 removes it) and extra padding
bare() No quiet zone, no padding, transparent background, no text
showText(), hideText(), label($text), fontSize($px) Human-readable text or a custom caption
color($fg, $bg), foreground(), background(), transparent() Colours (#RRGGBB, #RRGGBBAA, a name, transparent)
rotate($deg) 0 / 90 / 180 / 270
format($f) png, svg, pdf
qrVersion($v), qrMinVersion($v), mask($m), eci(), exactEcc() QR controls (a fixed version gives every code the same size)
style($s), logo($path, $size), logoSize($f) QR styling
checksum(), fullAscii() Code 39 / ITF options
verify() Decode the result and fail if it does not read back
force() Allow low-contrast colours
option($name, $value), options([...]) Any binary option by name

Content formats

These build correctly escaped content that phones understand:

Batches (bulk generation)

A batch generates every code in one process on all CPU cores. That is much faster than calling save() in a loop. You give each row your own id, and the results come back keyed by that id, in the order you added them.

Then choose where the images go:

Mixed rows and content formats in one batch:

Working with results:

One bad row never stops a batch; it appears in failed(). Other batch settings: ->workers(4), ->skipExisting(), ->manifest(__DIR__ . '/batch.csv').

Errors

Mojahed\EduplusQR\Exceptions\BinaryNotFoundException means the binary is missing, not executable, or too old. Both extend Mojahed\EduplusQR\Exceptions\EduplusException.

Configuration

Call configure() once at startup. It's optional, because the defaults and auto-detection work without it.

QrCode and BarCode share this configuration. For two independent setups in one app, use new \Mojahed\EduplusQR\Client($binary, $config), which has the same methods (->qr(), ->barcode(), ->batch(), …).

Upgrading from 1.0.1

1.0.1 1.0.2
Binaries bundled in bin/ (QR only) Install the EduplusQR binary once per server (QR and barcodes)
use Mojahed\EduplusQR; use Mojahed\EduplusQR\QrCode; / use Mojahed\EduplusQR\BarCode;
EduplusQR::create()->text($t)->output($p)->generate() QrCode::make($t)->save($p)
EduplusQR::quick($t, $p, 256) QrCode::make($t)->size(256)->save($p)
->size(256) ->size(256) (exact image size) or ->module(4)
->errorCorrection('H') ->ecc('H')
->margin(0) ->quiet(0); ->margin($px) is now extra padding
generateAndReturn() / generateBase64() (wrote a file first) toPng() / toBase64() (no file)
$qr->errors array, false on failure GenerationException with the exact message
Copied binaries into ~/eduplus_qr_bin when chmod was disabled Put the binary in your project's bin/ or set EDUPLUS_QR_BINARY

Examples and tests

License

MIT. See LICENSE.

Author

Md Mojahedul Islam: [email protected] · https://md-mojahed.github.io

Made With (❤️ Love) By: md-mojahed.github.io


All versions of eduplusqr with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mojahed/eduplusqr contains the following files

Loading the files please wait ...