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.
hakre3 Answers
- go to your DOMPDF folder
- copy your font's as .ttf (TrueType Font) or .otf (OpenType Font) into the DOMPDF's root
- open your command line and run
- DOMPDF now created Adobe Font Metrics and copied it to lib/fonts/* - you can now use it with
Dompdf Install New Fonts
UeliUeliIf 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!