在使用wkhtmltopdf时,我已经阅读了许多关于使用多种字体样式/面孔的麻烦的主题.
我们目前在同一页面上以常规样式和粗体样式使用Nunito(由Google webfonts提供)时遇到问题.我们已经尝试了许多(可能的)解决方案,但它们都没有给我们提供解决方案.
我们尝试了以下解决方案,但还没有人成功:
以上所有方法均无效.浏览器确实正确渲染它,但是wkhtmltopdf似乎正在渲染它.
我们已经发布了一些测试用例:http: //bannes.nl/fonts
如果有人对如何解决此问题有任何建议,请告诉我.如果您使用的是mac并安装了wkhtmltopdf,请随时在http://bannes.nl/fonts上测试这些案例.我已将每个测试用例的输出PDF包含在其目录中.
希望有人就如何解决这个问题提出建议!
最好的祝福,
知更鸟
我试图在 swagger (OAS3) 中指定以下 requestBody:
{
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"interest_ids": [
1,2
]
}
Run Code Online (Sandbox Code Playgroud)
我目前已指定 requestBody 如下:
* @OA\RequestBody(
* required=true,
* @OA\JsonContent(
* required={"email"},
* @OA\Property(property="first_name", type="string", format="string", example="John"),
* @OA\Property(property="last_name", type="string", format="string", example="Doe"),
* @OA\Property(property="email", type="string", format="email", example="user@example.com"),
* @OA\Property(property="interest_ids", type="array", @OA\Items(
* type="integer",
* example=3
* ),
* ),
* ),
* ),
Run Code Online (Sandbox Code Playgroud)
这给了我一个正确的 requestBody,但是这显然只给了我一个键,其值3作为interest_ids数组的示例值。如何在不将类型设置为字符串的情况下指定多个 id?我尝试了多种解决方案,例如将示例设置为example={1,2},不幸的是,这给了我数组中的另一个数组interest_ids:
{
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"interest_ids": [
[ …Run Code Online (Sandbox Code Playgroud) 我目前在 Laravel 5.6 中遇到以下问题,假设我有以下数据库表:
我正在寻找一种基于网站 ID 检索帖子的好方法。一个网站可以分配多个提供者(通过 website_providers),并且提供者可以分配多个帖子(他们也可以提供一个自定义的 post_name,它应该覆盖标准的 posts.name)。
在 Laravel 中实现这一目标的最佳方法是什么?我还尝试通过关系来做到这一点,但无法顺利进行。我还尝试使用很长的连接查询加载帖子,但感觉不对,必须有更简单、更漂亮的方式。
提前致谢!
php ×3
eloquent ×1
font-face ×1
font-style ×1
fonts ×1
laravel ×1
openapi ×1
swagger ×1
swagger-php ×1
wkhtmltopdf ×1