【发布时间】:2012-04-29 07:31:18
【问题描述】:
在我的项目中,我尝试使用 wicked_PDF 打印带有来自 HTML 的几个图像和文本的灰度 PDF。 Gem 提供了相同的功能,但它似乎不起作用。
这是我的代码:
render :pdf => "MyObject",
:wkhtmltopdf => '/usr/local/bin/wkhtmltopdf',
:template => '/widgets/pdf/show_myObject.erb',
:page_size => 'A4',
:header => { :html => { :template => "/widgets/pdf/myObject_header.erb" }},
:footer => { :html => { :template => "/widgets/pdf/myObject_footer.erb" }, :line => true },
:margin => { :top => 0, :left => 3, :right => 3 },
:greyscale => true
我将图像作为背景传递。但它呈现颜色。我错过了什么吗?为什么 wicked_PDF gem 无法按预期处理灰度函数?
他们的documentation 对此没有任何帮助。
【问题讨论】:
标签: ruby-on-rails-3 wicked-pdf