Forum: Ruby on Rails PDF::Writer Page Size

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
mwhite (Guest)
on 2005-11-27 08:01
(Received via mailing list)
Hey all,

I've got a question about some strange behavior I'm getting by using the
rpdf handler example that Austin wrote in the RoR wiki
( I used that
example, and my document generates as expected for the most part.
the page size is different than the page size I get when I just call
PDF::Writer from the command line using an .rb file. I have a document
out pretty exactly (it's a legal document, so they're picky), and the
document when generated using the handler is .23 (8.27 inches wide)
narrower than when generated directly from the command line with the
code.  I originally laid out the document by repeatedly generating the
via the command line, so that's my master. Since the .rpdf generated
document is narrower, my text is wrapping in some unexpected places.
tried setting the paper size to A4 and LETTER, both with the same
The page is also .69 inches longer (11.69 inches) than expected.

I can fiddle with the margins, but I just thought I must be doing
wrong. I could go back to calling the pdf generator as a library, but I
the handler approach. I'd love to keep it if I can. I'm instantiating
writer the same way in both places as well, so I'm pretty stumped. I
don't see what's different between the two locations, aside from
that's deeper than my knowledge of Rails. Has anyone else done this
have any insight about what could be wrong?


This topic is locked and can not be replied to.