yurikuzn / ext-tcpdf

TCPDF PDF engine for EspoCRM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCPDF engine for EspoCRM

Installation

Download a zip package from releases. Install it on EspoCRM (via CLI or at Administration > Extensions).

Supported EspoCRM versions:

  • 8.1

Note that you may need to increase post_max_size to install the extension via the UI due to its size. Or install in via CLI.

Configuration

Create config.json file in the root directory. You can copy config-default.json and rename it to config.json.

When reading, this config will be merged with config-default.json. You can override default parameters in the created config.

Parameters:

  • espocrm.repository - from what repository to fetch EspoCRM;
  • espocrm.branch - what branch to fetch (stable is set by default); you can specify version number instead (e.g. 5.9.2);
  • database - credentials of the dev database;
  • install.siteUrl - site url of the dev instance;
  • install.defaultOwner - a webserver owner (important to be set right);
  • install.defaultGroup - a webserver group (important to be set right).

Config for EspoCRM instance

You can override EspoCRM config. Create config.php in the root directory of the repository. This file will be applied after EspoCRM intallation (when building).

Example:

<?php
return [
    'useCacheInDeveloperMode' => true,
];

Building

After building, EspoCRM instance with installed extension will be available at site directory. You will be able to access it with credentials:

  • Username: admin
  • Password: 1

Preparation

  1. You need to have node, npm, composer installed.
  2. Run npm install.
  3. Create a database. The database name is set in the config file.

Full EspoCRM instance building

It will download EspoCRM (from the repository specified in the config), then build and install it. Then it will install the extension.

Command:

node build --all

Note: It will remove a previously installed EspoCRM instance, but keep the database intact.

Note: If an error occurred, check site/data/logs/ for details. It's often a database is not created.

Copying extension files to EspoCRM instance

You need to run this command every time you make changes in src directory and you want to try these changes on Espo instance.

Command:

node build --copy

Running after-install script

AfterInstall.php will be applied for EspoCRM instance.

Command:

node build --after-install

Extension package building

Command:

node build --extension

The package will be created in build directory.

Note: The version number is taken from package.json.

About

TCPDF PDF engine for EspoCRM

License:GNU General Public License v3.0


Languages

Language:PHP 80.1%Language:JavaScript 19.9%