Sha256: 10e0110c6d3ba94fdc0c6ef63849b47f1fa01ef3b0952314684ebce63796c43d
Contents?: true
Size: 1010 Bytes
Versions: 5
Compression:
Stored size: 1010 Bytes
Contents
# coding: utf-8 require 'open-uri' example :dynamic_image, 'Show images dynamically' do image50x50 = resource('img50x50.png') image200x100 = resource('img200x100.png') Thinreports::Report.generate filename: output_filename do |r| r.use_layout(layout_filename) r.start_new_page r.page.values(pos_top_left: image50x50, pos_top_center: image50x50, pos_top_right: image50x50, pos_center_left: image50x50, pos_center_center: image50x50, pos_center_right: image50x50, pos_bottom_left: image50x50, pos_bottom_center: image50x50, pos_bottom_right: image50x50) r.page.item(:overflow).src = image200x100 r.page[:thinreports_logo] = open('http://www.thinreports.org/assets/logos/thinreports-logo.png') r.page.list(:list) do |list| 3.times { list.add_row in_list: image50x50 } end end end
Version data entries
5 entries across 5 versions & 1 rubygems