本文整理汇总了PHP中DOMPDF::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP DOMPDF::getOptions方法的具体用法?PHP DOMPDF::getOptions怎么用?PHP DOMPDF::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOMPDF
的用法示例。
在下文中一共展示了DOMPDF::getOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: usage
generated using php-font-lib (https://github.com/PhenX/php-font-lib).
Examples:
./load_font.php silkscreen /usr/share/fonts/truetype/slkscr.ttf
./load_font.php 'Times New Roman' /mnt/c_drive/WINDOWS/Fonts/times.ttf
EOD;
exit;
}
if ($_SERVER["argc"] < 3 && @$_SERVER["argv"][1] != "system_fonts") {
usage();
}
$dompdf = new DOMPDF();
if (isset($fontDir) && realpath($fontDir) !== false) {
$dompdf->getOptions()->set('fontDir', $fontDir);
}
/**
* Installs a new font family
* This function maps a font-family name to a font. It tries to locate the
* bold, italic, and bold italic versions of the font as well. Once the
* files are located, ttf versions of the font are copied to the fonts
* directory. Changes to the font lookup table are saved to the cache.
*
* @param string $fontname the font-family name
* @param string $normal the filename of the normal face font subtype
* @param string $bold the filename of the bold face font subtype
* @param string $italic the filename of the italic face font subtype
* @param string $bold_italic the filename of the bold italic face font subtype
*
* @throws Exception