Yetiforcecrm: [Question] How use custom fonts in PDF?

Created on 9 Jul 2019  Β·  4Comments  Β·  Source: YetiForceCompany/YetiForceCRM

Description


Hi,
I'm searching the possibility to use own custom fonts (from Google Fonts).
Have searched all the documentations, also here ong GIT and with google. But can't find a working solution.

Wrong Information

Have only found this entry.
https://github.com/YetiForceCompany/YetiForceCRM/issues/3775

But it seams obvious outdated.

Tried a work-around

I downloaded the current-live installation and have search for the part for fonts.
Found this:

  • public_html\layouts\resources\fonts
    and have uploaded the new fonts and changed the fonts.css File.

Also under

  • vendor/yetiforce/yetiforcepdf/lib/Fonts
  • vendor/yetiforce/yetiforcepdf/lib/Objects/Font.php
    and have uploaded the new fonts and changed the Fonts.php File at line 56 and have add a new part for the new Font in $fontFiles .

No working solution

Unfortunately, under PDF-Editor I have still only Β«DejaVue SansΒ» as usable Font...

Any help or hint?

- Does anybody know the documentation for or could anybody help with information about which files I have also to change, or where in the System I could add new Fonts from YetiForce-Backend?

Would like to hear some tips or hints in the right direction.

❔ question

Most helpful comment

All 4 comments

Here you can find the instructions on how to do that : https://github.com/YetiForceCompany/YetiForcePDF#custom-fonts

Hi paula-w,
thank you for your link.

Will try as next with the custom-fonts.
Sorry for the following questions. Maybe you could send me a link to the documentation about. I can't find a matching docu :o(

1. Question for the right folder in the default-installation

In the Part about the Β«custom fontsΒ» there is to read:
Β«Upload your ttf font files to server and add following code at the beginning of your html.Β»

  • So, my question about: Is there a recommended folder/place for Font-files, so there will be safe while update/upgrade-process from YetiForce?

2. How I can use the recommended 2 Ways: Code at the beginning & inside php

Currently I create a PDF in the YetiForce Backend under > System Settings > System Tools > PDF > New PDF Tempate.
And I use it over: accounting > invoices > Add record.

  • Is there any other approach for?

Because unfortunately I can't find any documentation to use files like in the Β«examplesΒ» under https://github.com/YetiForceCompany/YetiForcePDF.
There I see a template is a combination about 2 files Β«1 html & 1 phpΒ».
BUT:

  • Where I have to store those files? (to be update-secure)
  • How can I use this files for PDF-invoices and PDF-offers? There is only a button for Β«import templateΒ», but this is only possible with xml-files not html/php files. :o((
  • Do you have any information about or documentation? Have search in all 4 Docu-Libraries :User, Administrator, Implementer, Developer, _without any match about_.

Thank you for your help
Regards
Martin

@mad99
to import html just click <> in the editor and paste it there

Was this page helpful?
0 / 5 - 0 ratings