Dompdf Install New Fonts

Dompdf Install New Fonts
Active3 years, 8 months ago

I'm Using DOM PDF 0.6.0 Beta 2. I want to use custom fonts (Fonts: 'Segeo Print', 'Lucida Handwriting','Airplanes in the Night Sky') in PDF file.

I followed the guidelines to install and use fonts in my PHP Code, which is given here http://code.google.com/p/dompdf/wiki/CPDFUnicode

But I'm not able to get desire fonts in my PDF. You can find my code in this post. Please Let me know how I can resolve this issue.

Font family Variants File versions; TTF AFM AFM cache UFM UFM cache; sans-serif: normal: /mnt/glusterfs/etflle/public_html/course_files/dompdf/lib/fonts/Helvetica. Font family Variants File versions; TTF AFM AFM cache UFM UFM cache; sans-serif normal: /home/itskins/public_html/modules/dompdf/lib/fonts/Helvetica: afm: 5: bold. Font family Variants File versions; TTF AFM AFM cache UFM UFM cache; sans-serif: normal: /home/weightworld/domains/slimcenter.de/public_html/pdf/lib/fonts/Helvetica. To use the DejaVu fonts. Download and install. Download an archive of dompdf and extract. // instantiate and use the dompdf class $dompdf = new Dompdf (). Font family Variants File versions; TTF AFM AFM cache UFM UFM cache; sans-serif: normal: /var/www/html/sites/all/libraries/dompdf/lib/fonts/Helvetica: afm: 5: bold.

Dompdf arabichakre
164k33 gold badges323 silver badges637 bronze badges
pinaldesaipinaldesai
1,5442 gold badges10 silver badges21 bronze badges

3 Answers

  1. go to your DOMPDF folder
  2. copy your font's as .ttf (TrueType Font) or .otf (OpenType Font) into the DOMPDF's root
  3. open your command line and run
  4. DOMPDF now created Adobe Font Metrics and copied it to lib/fonts/* - you can now use it with

Dompdf Install New Fonts

UeliUeli
1,0714 gold badges18 silver badges29 bronze badges
chokrijobschokrijobs

If you want to install custom fonts to server without command based interfacethen you can do the following web based model to install the custom fonts

1- Download ejaz.php from here

Download New Fonts

2- Put this file to root of dompdf and follow the instruction written in it

no need of root or command/terminal access

Install New Fonts On Mac

Thanks!

Ejaz47Ejaz47
Dompdf install new fonts

Not the answer you're looking for? Browse other questions tagged phppdf-generationdompdfcustom-font or ask your own question.