Html2pdf Creating Chinese fonts

Source: Internet
Author: User

Copy a Chinese font file such as Simfang.ttf copy to Tcpdf fonts\utils, switch to DOS window, modify directory to this Utils directory, execute the following command:

> ttf2ufm-a-F simfang.ttf> php-q makefont.php Simfang.ttf simfang.ufm false

Three files generated under a utils file

Simfang.ctg.z simfang.php simfang.z

Copy these three files to the fonts directory and you are ready to use them.

Include (html2pdf.class.php '); Reference Html2pdf class $html2pdf = new Html2pdf (' L ', ' A4 ', ' en ', true, ' Utf-8 ', array (0, 0, 0, 0)); $html 2pdf->pdf->setdisplay  Mode (' fullpage '); $html 2pdf->setdefaultfont (' Simfang '); $html 2pdf->writehtml ($content, false);        $content the content $html2pdf->output ($filename, ' D ') for printing to a PDF document; $filename the name of the downloaded PDF document



Html2pdf Creating Chinese fonts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.