Paging problem

1 view
Skip to first unread message

SteveM

unread,
Feb 22, 2009, 6:32:55 PM2/22/09
to Ruby Reports
I am trying to product a specialized 3 column report (similar to a
mailing labels approach), as a pdf.
I use draw text to produce my output, but am having trouble with 2
pages will print correctly then
the page gets scrambled.

Is there any counter I cans et or use in my program that will aloow me
to control hwen a new page is generated.

What I have seen of Ruport so far is pretty slick and I am replacing
our entire library of Jasperreports and JasperServer with Ruport!

Gregory Brown

unread,
Feb 22, 2009, 6:38:01 PM2/22/09
to ruby-r...@googlegroups.com
On Sun, Feb 22, 2009 at 6:32 PM, SteveM <steveme...@gmail.com> wrote:
>
> I am trying to product a specialized 3 column report (similar to a
> mailing labels approach), as a pdf.
> I use draw text to produce my output, but am having trouble with 2
> pages will print correctly then
> the page gets scrambled.
>
> Is there any counter I cans et or use in my program that will aloow me
> to control hwen a new page is generated.

This may or may not be a PDF::Writer bug. I'm not really maintaining
Ruport 1.x anymore, as Ruport 2 will be developed as soon as I have
time for it and will be Prawn based for PDF generation. But maybe
you can post a simplified example of what you are trying to do and one
of our users might be able to help offer some suggestions.

> What I have seen of Ruport so far is pretty slick and I am replacing
> our entire library of Jasperreports and JasperServer with Ruport!

very cool. Things may change a bit in the near future with Ruport 2,
but I'm glad you like it so far.

--
Technical Blaag at: http://blog.majesticseacreature.com
Non-tech stuff at: http://metametta.blogspot.com
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpractices.com

SteveM

unread,
Feb 23, 2009, 4:13:44 PM2/23/09
to Ruby Reports
Hi,
I did some code digging and found that a simple solution was:

if cursor <= 88.0 then
pdf_writer.new_page
y = top_boundary
move_cursor_to(top_boundary)
end

after the last output statement in my iteration.

I am looking forward to Ruport 2.0 as everything works really well and
is easily understood.

Could have used something like it in my Smalltalk days. :)


Cheers,
Steve

On Feb 22, 3:38 pm, Gregory Brown <gregory.t.br...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages