Skip to content

Instantly share code, notes, and snippets.

@hidakatsuya
Created August 17, 2011 06:04
Show Gist options
  • Save hidakatsuya/1150904 to your computer and use it in GitHub Desktop.
Save hidakatsuya/1150904 to your computer and use it in GitHub Desktop.
ThinReports Example: Text Block Tool
# coding: utf-8
require 'rubygems'
require 'thinreports'
ThinReports::Report.generate_file('tblock.pdf', :layout => 'tblock.tlf') do
start_new_page
page.values :single_line_left => 'Left(Default)',
:single_line_center => 'Center',
:single_line_right => 'Right'
page.item(:multi_line).value("ThinReports Text Block Tool.\n" +
"ThinReports Text Block Tool.")
page.values :datetime_format => Time.now,
:number_format => 99999.9999,
:padding_format => 999,
:basic_format => 1980
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment