略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: PDF_load_font

2024-05-07

PDF_load_font

(PECL pdflib >= 2.0.0)

PDF_load_fontSearch and prepare font

说明

PDF_load_font ( resource $pdfdoc , string $fontname , string $encoding , string $optlist ) : int

Searches for a font and prepares it for later use.

add a note add a note

User Contributed Notes 2 notes

up
5
seufert at gmail dot com
12 years ago
This function is used to load a font into memory for later use with PDF_setfont()

This function is the replacement for the depracated PDF_find_font()

And also here is the 'core font' list, for PDF files, these do not need to be embeded:
- Courier
- Courier-Bold
- Courier-Oblique
- Courier-BoldOblique
- Helvetica
- Helvetica-Bold
- Helvetica-Oblique
- Helvetica-BoldOblique
- Times-Roman
- Times-Bold
- Times-Italic
- Times-BoldItalic
- Symbol
- ZapfDingbats

And with encodings i have found its best to use iso8859-1 for english with a $ for currency.
up
-7
james dot ferguson at doesnt dot share dot email dot com
11 years ago
In PDFLib 5 'optlist' allows the following possible settings:

embedding=true
subsetting=true
subsetlimit=50
kerning=false

官方地址:https://www.php.net/manual/en/function.pdf-load-font.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3