小编Pau*_*rto的帖子

mPDF v8.0.4 - 在 PDF 文件上打印自定义字体

1\xc2\xb0这个问题应该很容易解决,但三天以来我一直在努力奋斗。

\n

2\xc2\xb0我只需要在 PDF Roboto-Regular 和 Roboto-thin 中使用两种字体。

\n

3\xc2\xb0我已经阅读了手册,但不幸的是我仍然做错了或者文件中缺少某些内容。
\n文档:https://mpdf.github.io/fonts-languages/font-names.html

\n

4\xc2\xb0我刚刚在 PD 文件上打印了Roboto-Regular ,但没有打印Roboto-Thin
\n非常非常感谢任何帮助!

\n

文件testmpdf.php

\n
// Load MPDF Loader\nrequire_once __DIR__ . \'/vendor/autoload.php\';\n\nuse Mpdf\\Mpdf;\n\n$mpdf = new Mpdf();\n$mpdf = new \\Mpdf\\Mpdf([\'tempDir\' => __DIR__ . \'/custom/temp/dir/path\']);\n\n$defaultConfig = (new \\Mpdf\\Config\\ConfigVariables())->getDefaults();\n$fontDirs = $defaultConfig[\'fontDir\'];\n\n$defaultFontConfig = (new \\Mpdf\\Config\\FontVariables())->getDefaults();\n$fontData = $defaultFontConfig[\'fontdata\'];\n\n$mpdf= new \\Mpdf\\Mpdf(\n[\'mode\' => \'utf-8\',\n\'format\' => \'A4\',\n\'margin_left\' => 0,\n\'margin_right\' => 0,\n\'margin_top\' => 0,\n\'margin_bottom\' => 0,\n\'margin_header\' => 0,\n\'margin_footer\' => 0,\n\'fontDir\' => array_merge($fontDirs, [\n        __DIR__ . \'/assets/css/fonts\',\n …
Run Code Online (Sandbox Code Playgroud)

php pdf wordpress mpdf woocommerce

4
推荐指数
1
解决办法
3574
查看次数

Wordpress 5.6.1 - 权限策略标题实现

我需要在 .htacces 文件中实现权限策略标头

我花了一整天的时间在互联网上寻找标题,但是,我只找到了一些解释,说明我没有 100% 理解如何实现它。

我在这篇文章Permissions-Policy 中找到了关于标题的更好的解释。我在 .htacces 文件中插入了这行代码以使魔法发生,但我没有在securityheaders上看到绿旗

Permissions-Policy: fullscreen=(self "https://example.com" "https://another.example.com"), geolocation=*, camera=()
Run Code Online (Sandbox Code Playgroud)

请,我将非常感谢您的帮助!

图像显示安全标头扫描的结果

安全头扫描结果

wordpress http wordpress-theming http-headers custom-wordpress-pages

2
推荐指数
2
解决办法
2426
查看次数