search for: add_object

Displaying 3 results from an estimated 3 matches for "add_object".

2006 Jan 03
2
Pdf::Writer ; page numbering, and table wrapping
...f 2", "1 of 3", "1 of 4", etc. Using the pattern string (''<PAGENUM> of <TOTALPAGENUM>'' results in the same output. Secondly, the auto-wrapping of tables, runs directly into both the before mentioned page numbers, and into a header added via add_object(.., :all_pages). Is there a way to configure the auto-wrapping of tables to skip a Y? I''m configuring the other paths, so I do know in advance where wrapping should start, and begin. Thanx for any thoughts. cheers, Jodi -- Posted via http://www.ruby-forum.com/.
2006 Jun 13
2
Top margin on PDF generated with PDF::Writer
...:height => PDF::Writer.cm2pts(6) #pdf.add_text_wrap(0, pdf.y, PDF::Writer.cm2pts(1), "Test1", 12, :left, 0) #pdf.add_text_wrap(PDF::Writer.cm2pts(8.5), pdf.y, PDF::Writer.cm2pts(6), "Test2", 12, :center, 90) pdf.restore_state pdf.close_object pdf.add_object(card, :this_page) end end pdf.save_as("public/pdf/cupones.pdf") end But the generated pdf has a top margin of 36pt, and the cards are then printed in two pages. I need a margin of 0 for the page, to ensure that all that cards are printed at the same page. Also, a couple of cards...
2006 May 05
8
pdf/writer: table.render_on best practices?
...e_left_margin w = pdf.absolute_right_margin y -= (pdf.font_height(s) * 1.01) pdf.line(x, y, w, y).stroke y = pdf.absolute_bottom_margin + pdf.font_height(9) - 2 pdf.line(x, y, w, y).stroke pdf.restore_state pdf.close_object pdf.add_object(heading, :all_pages) end 2) create a table: table = PDF::SimpleTable.new 3) populate the table table.data = dataArray 4) set which rows are displayed, and in which order: table.column_order = rows (Note: only some rows are displayed) 5) I set the width: table.width = pdf.absolute_right_ma...