Do you need a PHP programmer?
Use my services as a freelance PHP programmer by hiring me to do PHP programming on your website project.

I have built many custom PHP applications like project managers, classified ad websites and content management systems. I also work with open source applications such as WordPress, online shopping cart websites like Magento and develop content management systems like Joomla.

Monday, December 24, 2012

Add New Font for Dompdf

Hi Hallo,
In this post we will talk about PDF file conversion exactly DomPDF.
It allows direct conversion of HTML files to PDF files. But I found some issues when I was using this module, when I tried to generate pdf file, the result was not same as my html file. Some of fonts didn't apply in the pdf file. I goggled the web and found some solutions. And now I solved it.
I will share how to add your own font for dompdf,

1. For the simple step please go here DOMPDF web-base
2. Complete the form and upload your own font


  Make sure your dompdf version same with version in the form and Go

3. Download and extra the result (.zip). then Copy the contents of the result( .tff, .ufm) to your DOMPDF fonts folder (typically located at dompdf/lib/fonts).

4. If you have not previously installed fonts, you can rename the file dompdf_font_family_cache.sample(this file from the archive) to be dompdf_font_family_cache.dist.php (located at dompdf/lib/fonts). If you have previously installed fonts you will need to copy the relevant entry from the sample file into dompdf_font_family_cache.dist.php file.
Below is example for add some entry to dompdf_font_family_cache.dist.php


5.  Once you have taken these steps your font should be installed and ready to use.

Hope it can help, but if you still have any question
Please feel free to write your comment below.

Kind regard,
Bayu Prawira

3 comments:

  1. http://eclecticgeek.com/dompdf/load_font.php that url is not working

    ReplyDelete
  2. please check url http://eclecticgeek.com/dompdf/load_font.php

    ReplyDelete
  3. Add New Font For Dompdf >>>>> Download Now

    >>>>> Download Full

    Add New Font For Dompdf >>>>> Download LINK

    >>>>> Download Now

    Add New Font For Dompdf >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete