【发布时间】:2017-11-01 13:31:40
【问题描述】:
我正在创建一个 pdf 文件并保存它。
pdf=WickedPdf.new.pdf_from_string(
html,
header: {content: html_header},
footer: {content: html_footer},
page_height: '11in',
page_width: '8.5in',
show_as_html: true
)
save_path = Rails.root.join('example.pdf')
File.open(save_path, 'wb') do |file|
file << pdf
end
return
是否可以用 chrome 作为 html 打开它并检查 css ?
【问题讨论】:
-
为什么您认为可以将 PDF 作为 HTML 进行检查?
-
因为 wicked pdf 支持调试模式,您可以在其中将其预览为 html。
-
所以,这在文档中有所介绍。 github.com/mileszs/wicked_pdf#debugging 什么不起作用?
-
部分覆盖,但没有明确的例子。
-
我试过了,但是没有用。
标签: wicked-pdf