Displaying 1 result from an estimated 1 matches for "absolute_left_margin".
2006 May 05
8
pdf/writer: table.render_on best practices?
...k
pdf.stroke_style! PDF::Writer::StrokeStyle::DEFAULT
s = 9
t = "My title - " + Date.today().to_s
w = pdf.text_width(t, s) / 2.0
x = pdf.margin_x_middle
y = pdf.absolute_top_margin
pdf.add_text(x - w, y, t, s)
x = pdf.absolute_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(he...