在我的项目中,我正在尝试使用 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 无法按预期处理灰度功能?
他们的文档对此没有任何帮助。