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
(http://wiki.rubyonrails.com/rails/pages/HowtoGeneratePDFs). 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?