DEV Community

Pappu Ji
Pappu Ji

Posted on

1

TCPDF: How to add new custom font in tcpdf

1) Download required font's ttf file
2) Open http://www.fpdf.org/makefont website in the browser and upload the ttf font on this website
3) Download two files customfontname.php and customfontname.z
4) Copy these two files into /yourproject/vendor/tecnickcom/tcpdf/fonts/ folder
5) include / set the font in your script before tcpdf html code $pdf->SetFont('customfontname', '', 12);

Alternate font generation website:
https://fonts.palettize.me

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs