Skip to content

Instantly share code, notes, and snippets.

View woodyhayday's full-sized avatar

Woody Hayday woodyhayday

View GitHub Profile
@woodyhayday
woodyhayday / install_pdfdom_font_incode.php
Last active April 20, 2024 16:48
Install a .ttf font file into dompdf without using command line
<?php
/**
* Install a .ttf font file into dompdf without using command line
* Tested to pdfdom 0.8.2 - https://github.com/dompdf/dompdf
* Adapted from pdfdom utils - https://github.com/dompdf/utils - https://github.com/dompdf/utils/blob/master/load_font.php
*
* Steps to use:
* 1. Retrieve font you want to use as a .ttf (for language support including Cyrillic, Greek, Devanagari, Latin, and Vietnamese, we used Noto Sans with all optional languages checked)
* 2. Run/build in this script and fire PDFBuilder_install_font_family() ONCE only (singular install)
function zbsCustom_modifyTabs( $arr, $id ) {
// this is just a check :)
if (!is_array($arr)) $arr = array();
// Here we add the new tab
// 'id' = Represents HTML id attribute, must be unique & html-attribute format (e.g. a-b-c)
// 'name' = Title string
// 'content' = the HTML you want to display in your tab (you could use another function to produce this)
$arr[] = array(
<?php
/*
Plugin Name: Zero BS CRM [Example Code]
Plugin URI: https://zerobscrm.com
Description: This code example adds a custom tab to your Zero BS CRM Company View
Version: 1.0
Author: <a href="https://zerobscrm.com">Zero BS CRM</a>
Text Domain: zerobscrm
*/
<?php
/*
Plugin Name: Zero BS CRM [Example Code]
Plugin URI: https://zerobscrm.com
Description: This code example adds a custom tab to your Zero BS CRM Contact View
Version: 1.0
Author: <a href="https://zerobscrm.com">Zero BS CRM</a>
Text Domain: zerobscrm
*/
/*