Download the PHP package eliepse/working-grid-pdf without Composer

On this page you can find all versions of the php package eliepse/working-grid-pdf. 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 working-grid-pdf

Working grid PDF

Library to easily create working grids and export them as PDF

This library works with SVG. If you are looking for resources about chinese characters, strokes as svg, you might want to take a look at Make Me A Hanzi.

Installation

You can install this library using composer.

Usage

The most basic way of using this library would be like the following. You can see a more complete exemple in the public directory.

Words, characters and strokes data

Words

This libray support multi-characters words. To normalize data, pass, you must instanciate your Word class with Drawable elements. The Character class is a ready-to-use Drawable.

Characters

Character class takes two parameters: the character as a string and the strokes of this character. To draw the character, this library uses SVG data. Pass strokes data as an array. If you want to show a help to draw the characters in the right order, order the array as well. Using this class is not required, you can create your own but it must implement the Drawable interface.

An exemple of an array of strokes for the character 四:

To see more exemples data, check the content of the /samples/strokes folder where some characters are stored in JSON. Take a look at Make Me A Hanzi to get more open source strokes data !

Templates

In order to provide flexibility and customization, this library use a system of templates. To make a custom working grid, create a class that extends Template, or use predifiened examples.

Custom header and footer

When creating a template, you can implements CustomizableHeader and CustomizableFooter in order to customize the header and footer. The methods include a access to the instance of mPDF used to render the document, and an PageInfo object with information of the current drawn page.

Extras

Strokes order

Too print a help that show the strokes order, simply implement the WithDrawingTutorial interface to your template.

Pinyin

If you want to show the pinyin of caracters, implement the WithPinyin interface to your template.

Configuration

You can use differents properties to customize your document. All are accessible in the template and some are accessible as template constructor's parameters.

Property Type Description
title string The title of the document.
columns_amount integer The number of cells (columns) per line, influence the size of cells.
model_amount integer The number of cells that keep a light gray character as a helping model.
paddings array Set the padding of pages in millimeters. Formated as CSS : top, right, bottom, left.
header_height float Set the header height in millimeters.
footer_height float Set the footer height in millimeters.
stroke_color float Set the color of the first drawn character.
model_color string Set the color the characters dranw as models.
grid_color string Set the color of the grid.
guide_color string Set the color of guide strokes (background).

Features

Property Type Description
tutorial_height float The size, in millimeters, of box that shows a help for drawing strokes. Relative to the cell size when set to 0.

Built With


All versions of working-grid-pdf with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-mbstring Version *
mpdf/mpdf Version ^8.0
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 eliepse/working-grid-pdf contains the following files

Loading the files please wait ....