开发者

pdfkit with google web fonts

开发者 https://www.devze.com 2023-04-01 11:13 出处:网络
I\'m trying to create a pdf with PDFKit from a webpage with custom Google Web fonts. I can\'t seem to get the custom fonts to work properly.

I'm trying to create a pdf with PDFKit from a webpage with custom Google Web fonts.

I can't seem to get the custom fonts to work properly.

I'm using the default PDFKit middleware for Rails, as shown here.

Can someone please show me a .html file and the (preferably ruby) code that converts it to a pdf using PDFKit or just wkhtmltopdf. The converted pd开发者_开发知识库f should have pretty fonts :)


We just had the same problem with wicked_pdf, which uses wkhtmltopdf, too. Our solution was to download the font and install them on the machines, which generate the pdfs. Then use the fonts like every other system font.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号