首页 \ 问答 \ pdfkit与谷歌网络字体(pdfkit with google web fonts)

pdfkit与谷歌网络字体(pdfkit with google web fonts)

我正在尝试使用带有自定义Google Web字体的网页创建带有PDFKit的pdf。

我似乎无法使自定义字体正常工作。
我正在使用Rails的默认PDFKit中间件,如下所示。

有人可以给我看一个.html文件和(最好是ruby)代码,使用PDFKit或wkhtmltopdf将其转换为pdf。 转换后的pdf应该有漂亮的字体:)


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 pdf should have pretty fonts :)


原文:https://stackoverflow.com/questions/7259278
更新时间:2022-04-10 14:04

最满意答案

请参阅在Stack Overflow上自动获取Unix系统上的堆栈跟踪


相关问答

更多
  • linux c编程?[2022-03-13]

    除了 darkerwc2的回答 其他都。。 特别是manson11812 同学的 你好搞笑 linux 下C编程需求学些什么 你需要学什么就学什么 难道有谁能肯定说要学什么 当然会用电脑、会打字之类的肯定要学会 linux 下c的 优势在于 C可以算作unix的native language 很多库的接口都是首先考虑C C语言是unix里面用的最多的其次是其他各类脚本语言(不限与shell) 学习gtk是要看你兴趣 如果有c++基础可以去学QT 嵌入式qt用的要多些 而且qt4之后不存在 商业版权问题了 有 ...
  • C++是语言,我想你说的安装应该是开发环境吧 你安装netbeans就可以了 这个是一个linux下的IDE 很好用
  • 正如Itwasntpete回答的那样,您可以设置(使用带有 SA_SIGINFO sigaction(2) ,不要使用signal(2) !) SIGSEGV的信号处理程序。 但是,请先仔细阅读信号(7) 。 请注意,如果您想完全捕获SIGSEGV (或其他异步信号,如SIGBUS , SIGILL , SIGFPE等)并继续处理,则它非常棘手并且特定于机器。 如果从SIGSEGV明确地返回,则机器状态保持不变,并且执行返回到已触发SIGSEGV的机器指令,该指令无限制地重新进行(您陷入无限循环)。 因此, ...
  • 首先, clock()返回程序使用的CPU时间估计值,而不是挂钟时间 - 因此您的计算表明您每秒传输12GiB的CPU时间。 而是使用时钟ID为CLOCK_MONOTONIC clock_gettime()来测量挂钟时间。 其次,在write()返回之后,数据还没有被发送到网络 - 只是复制到内核缓冲区中进行发送。 这将在连接开始时为您提供更高的报告传输速率。 Firstly, clock() returns an estimate of the CPU time used by the program, ...
  • 更多最新的基本设置说明可以在ACRA的GitHub Wiki上找到: https : //github.com/ACRA/acra/wiki/BasicSetup 声明SenderService ACRA(4.8+)使用SenderService发送报告,因此需要在您的AndroidManifest中进行配置。 如果您使用清单合并,那么SenderService将自动包含给您。 否则,您还需要配置将发送报告的服务。 它应该看起来像:
    你真的想使用CrashRpt。 我使用CrashRpt在5个不同的大型应用程序中取得了巨大的成功。 CrashRpt为您提供了源代码,所以您可以根据需要自定义它。 其他几个大型和流行的应用程序也使用crashrpt,包括乌龟svn。 顺便说一下,我所有的C ++项目都是在2005年,而且我们对CrashRpt没有任何问题。 你可以在这里找到最新的谷歌代码 。 You really do want to use CrashRpt. I use CrashRpt with great success in 5 ...
  • 当我们进行跨平台工作时(从之前的Windows版本开始),我们花了很多时间研究可能的工具。 Google Breakpad确实是最好的跨平台解决方案。 你的问题是Socorro,它是巨大的,混淆的,令人困惑的。 我可以建议两条路线: 删除当前版本的Socorro,它太喜欢Hadoop等新奇的OSS玩具,并回滚到Socorro 1.x. 你需要做更多的工作来设置你的处理器,你的转储将进入Postgres表,但你将有更少的移动部件和疯狂的基础设施来处理。 完全忘掉Socorro并为Breakpad转储编写自己的 ...
  • 是的,Reporting Services在http://server/reportserver有一个带有丰富API的Web服务 您还可以在应用中使用ReportViewer控件 一般来说,你应该看看这个页面“Reporting Services Programming” Yes, Reporting Services has a web service under http://server/reportserver with a rich API You can also use the ReportV ...
  • 请参阅在Stack Overflow上自动获取Unix系统上的堆栈跟踪 。 See Getting stack traces on Unix systems, automatically on Stack Overflow.
  • 不,这不是内核崩溃。 这是来自内部看门狗定时器的警告通知,它监视飞思卡尔Gianfar以太网驱动程序的传输工作。 该消息意味着驱动程序已经排队了一帧用于传输,并且超时从Ginafar硬件获得发送确认中断(或其他指示)。 这可能是驱动程序问题 - 但它很可能是硬件问题(例如以太网MAC卡住)。 顺便说一句,消息的内容表明你的系统在看门狗定时器发生时没有做任何事情(空闲)。 No, it isn't a kernel crash. It's a warning notification from an inte ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)