简体   繁体   中英

How to define font in FPDF?

I am trying to make a writable .PDF document for my Drupal-site. I am a newbie at Drupal so I am attaching the code as a part of the body. Now I cannot get it load the fonts. I get the following error: **

FPDF error: Could not include font definition file

**

I have tried modifying the folder privileges and defining the path in the following way:

define('php', 'module', 'resources/php/fpdf/font/courier.php');
module_load_include('php', 'module', 'resources/php/fpdf/fpdf');

Could someone spare 5 minutes and tell me how to do it. It would mean a lot to me,

Thanks

The definition of the path to the fpdf font directory is done like this:

define('FPDF_FONTPATH', 'resources/php/fpdf/font/');  

the path must be relative to the location of your php code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM