Displaying 2 results from an estimated 2 matches for "margin_x_middl".
Did you mean:
margin_x_middle
2006 Jan 03
2
Pdf::Writer ; page numbering, and table wrapping
...er list - If there''s a more appropriate
place for me to ask these questions I''d appreciate being set straight.
I''m having a couple of misunderstandings/isssues first with page numbers
and secondly with auto-wrapping of simple_table.
First
pdf.start_page_numbering(pdf.margin_x_middle,
pdf.absolute_bottom_margin, 9, :center, nil, nil)
Using the default ''pattern'', is rendering ''x of N+1'' - or specifically
it always thinks that <TOTALPAGENUM> is 1 greater than the number of
pages in the document. I''ve rendered 1, 2 and 3 page...
2006 May 05
8
pdf/writer: table.render_on best practices?
...l, t, nil)
pdf.open_object do |heading|
pdf.save_state
pdf.stroke_color! Color::Black
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...