PDF::Writer Page Size

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
(Peak Obsession). I used that
example, and my document generates as expected for the most part.
However,
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
laid
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)
inches
narrower than when generated directly from the command line with the
same
code. I originally laid out the document by repeatedly generating the
pdf
via the command line, so that’s my master. Since the .rpdf generated
document is narrower, my text is wrapping in some unexpected places.
I’ve
tried setting the paper size to A4 and LETTER, both with the same
behavior.
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
something
wrong. I could go back to calling the pdf generator as a library, but I
love
the handler approach. I’d love to keep it if I can. I’m instantiating
the
writer the same way in both places as well, so I’m pretty stumped. I
just
don’t see what’s different between the two locations, aside from
something
that’s deeper than my knowledge of Rails. Has anyone else done this
and/or
have any insight about what could be wrong?

Thanks!

Matt