邪恶的pdf方面问题
我正在使用wicked pdf导出一个表
这是使用邪恶的控制器
def print_invoice respond_to do |format| format.pdf{ send_data render( ####### WICKED CODE ###### :pdf => "invoices", :margin => {:top=> 0,:bottom => 0,:left=> 0,:right => 0}, :orientation => "Landscape", :print_media_type => true,:disable_smart_shrinking => true) ) ####### END WICKED CODE ###### } end end
这是打印视图
这是我得到的pdf
我希望这个在左侧但不起作用
我没有尝试过:
:margin => {:top=> 0,:bottom => 0,:left=> -10,:right => 0},
请有人可以帮帮我吗?
是的,留下一个位置保证金,试试这个代码:
:margin => {:top=> 0,:bottom => 0,:left=> 0.1,:right => 0},
正如arieljuod所说,你必须这样做。