使用pdf文件的整个空间
我使用prawn创建pdf文件,但它总是在页面周围留下一些空间/边距。我们不能使用pdf文件的整个空间而不留下任何空白吗使用pdf文件的整个空间,pdf,ruby-on-rails-3,pdf-generation,prawn,prawnto,Pdf,Ruby On Rails 3,Pdf Generation,Prawn,Prawnto,我使用prawn创建pdf文件,但它总是在页面周围留下一些空间/边距。我们不能使用pdf文件的整个空间而不留下任何空白吗 谢谢 您指的是页面边界吗 页面上消耗的一般空间可通过示例代码显示: require 'prawn/core' require 'prawn/layout' Prawn::Document.generate('padded_box.pdf') do stroke_bounds text "Margin box" padded_box(25) do stro
谢谢 您指的是页面边界吗 页面上消耗的一般空间可通过示例代码显示:
require 'prawn/core'
require 'prawn/layout'
Prawn::Document.generate('padded_box.pdf') do
stroke_bounds
text "Margin box"
padded_box(25) do
stroke_bounds
text "Bounding box padded by 25 on all sides from the margins"
padded_box(50) do
stroke_bounds
text "Bounding box padded by 50 on all sides from the parent bounds"
end
end
end
这将绘制显示边距的页面边界。有一个间隙,即通常为打印区域定义的页边距您指的是页面边界吗 页面上消耗的一般空间可通过示例代码显示:
require 'prawn/core'
require 'prawn/layout'
Prawn::Document.generate('padded_box.pdf') do
stroke_bounds
text "Margin box"
padded_box(25) do
stroke_bounds
text "Bounding box padded by 25 on all sides from the margins"
padded_box(50) do
stroke_bounds
text "Bounding box padded by 50 on all sides from the parent bounds"
end
end
end
这将绘制显示边距的页面边界。有一个间隙,即通常为打印区域定义的边距我认为没有办法做到这一点。我们不能使用整个pdf页面空间。代码示例是显示prawn中的默认边距。好的,再次使用填充框和边界框。我认为没有办法做到这一点。我们无法使用整个pdf页面空间。代码示例用于显示prawn中的默认边距。好的,再次显示填充框和边界框