Issue with Sugarpdf : TCPDF ERROR: Could not include font definition file: helvetica

Hello everybody,

I am trying to build a pdf programmaticaly. To create a pdf, I first call the contructor:
$pdf = new Sugarpdf($bean=null, $sugarpdf_object_map=[], $orientation=‘L’, $unit=‘mm’, $format=‘A4’, $unicode=true, $encoding=‘UTF-8’, $diskcache=false);

I get the message: TCPDF ERROR: Could not include font definition file: helvetica (and die)

Helvetica is the default font.
I tried putting fonts in different font folders (the documentation is not very explicit)
I am using version 7.9.4

Anybody could help ?
Thanks in advance.
Bernard

When you say Documentation, you mean the TCPDF documentation, I hope?

Maybe the path you need is this one?

https://github.com/salesagility/SuiteCRM/blob/master/include/Sugarpdf/sugarpdf_default.php#L48

I must warn you, I don’t know anything about this issue, I’m just doing a very quick search around the code… good luck.

Hi,
Thank you for the information. It will be useful to define default option.
But this doesn’t solve my problem.
The Sugar documentation only says in which folder to put new fonts (including Helvetica), which I did.
But the problem is that I cannot begin building a new pdf since the default font helvetica is not detected, and the Sugar doc says nothing about this.

I try getting the info in the TCPDF documentation, but up to now I didn’t find.

Bernard

If you are a developer, maybe you can try installing XDEBUG and debugging this properly, to find out?

Hi! I’m having the same problem with a fresh suitecrm installation. I can’t generate a pdf because the same issue, somebody can help me?
Thanks in advance!