Compatible with the Dompdf PDF engine. Expands support for international character sets. Compatible with EspoCRM v9.4 and greater.
This pack includes the following font families:
- Noto Sans
- Noto Sans Armenian
- Noto Sans Georgian
- Noto Sans Hebrew
- Noto Sans Japanese
- Noto Sans Korean
- Noto Sans Simplified Chinese
Note that fonts that require re-shaping or re-positioning are not currently supported in Dompdf.
- Download the extension package from the releases.
- Install in EspoCRM at Administration > Extensions.
- Choose the needed font in a PDF template.
In a PDF template, you can use multiple fonts by applying the font-family CSS property inline.
Everything below is for developers.
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 (
stableis set by default); you can specify version number instead (e.g.9.1.0); - 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).
You can override EspoCRM config. Create config.php in the root directory of the repository. This file will be applied after EspoCRM installation (when building).
Example:
<?php
return [
'useCacheInDeveloperMode' => true,
];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
- You need to have node, npm, composer installed.
- Run
npm install. - Create a database. Note that without the created database instance building will fail. The database name is set in the config file. You can change it.
It will download EspoCRM (from the repository specified in the config), then build and install it. Then it will install the extension.
Command:
npm run 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.
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:
npm run sync
To avoid running this command manually, use a file watcher in your IDE. The configuration for PhpStorm is included in this repository. See below about the file watcher.
Command:
npm run extension
The package will be created in build directory.
Note: The version number is taken from package.json.
- Do development in
srcdir. - Run
npm run sync. - Test changes in EspoCRM instance at
sitedir.
The version number is stored in package.json and package-lock.json.
Bumping version:
npm version patch
npm version minor
npm version major
You need to set the following paths to be ignored in your IDE:
buildsite/buildsite/custom/site/client/custom/site/tests/unit/Espo/Modules/PdfFontssite/tests/integration/Espo/Modules/PdfFonts
You can set up a file watcher in the IDE to automatically copy and transpile files upon saving.
File watcher parameters for PhpStorm:
- Program:
node - Arguments:
build --copy-file --file=$FilePathRelativeToProjectRoot$ - Working Directory:
$ProjectFileDir$
Note: The File Watcher configuration for PhpStorm is included in this repository.
Update the version number of espo-extension-tools in package.json to the latest one.
Run:
npm update espo-extension-tools
npm update espo-frontend-build-tools
Or just update everything:
npm update