summaryrefslogtreecommitdiffhomepage
path: root/examples/example.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example.rb')
-rwxr-xr-x[-rw-r--r--]examples/example.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/example.rb b/examples/example.rb
index e1fc945e..0027c797 100644..100755
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -333,12 +333,14 @@ end
#```
-##Specify Page Margins for printing
+##Specify page margins and other options for printing
#```ruby
margins = {:left => 3, :right => 3, :top => 1.2, :bottom => 1.2, :header => 0.7, :footer => 0.7}
-wb.add_worksheet(:name => "print margins", :page_margins => margins) do |sheet|
- sheet.add_row ["this sheet uses customized page margins for printing"]
+setup = {:fit_to_width => 1, :orientation => :landscape, :paper_width => "297mm", :paper_height => "210mm"}
+options = {:grid_lines => true, :headings => true, :horizontal_centered => true}
+wb.add_worksheet(:name => "print margins", :page_margins => margins, :page_setup => setup, :print_options => options) do |sheet|
+ sheet.add_row ["this sheet uses customized print settings"]
end
#```