# Re: PDF::Writer Page Size

**URL:** <https://www.ruby-forum.com/t/re-pdf-writer-page-size/50364>\
**Category:** Rails\
**Created:** [November 27, 2005, 7:21am UTC](https://www.ruby-forum.com/t/re-pdf-writer-page-size/50364 "2005-11-27T07:21:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwhite](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@mwhite](https://www.ruby-forum.com/u/mwhite)\
**Post date:** [November 27, 2005, 7:21am UTC](https://www.ruby-forum.com/t/re-pdf-writer-page-size/50364/1 "2005-11-27T07:21:34Z")

</div>

More info. Looks like the size problem arises when the document is  
generated  
by calling pdf.render and sending the output directly to the browser  
instead  
of writing an intermediate file using save\_as. I’d really hate to have  
to  
deal with temp files.

I suppose it might be a bug. I guess I may just have to work around it  
for  
now.

Matt

---

<div class="post-metadata">

**Author:** ![mwhite](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@mwhite](https://www.ruby-forum.com/u/mwhite)\
**Post date:** [November 28, 2005, 6:11am UTC](https://www.ruby-forum.com/t/re-pdf-writer-page-size/50364/2 "2005-11-28T06:11:13Z")

</div>

For what it’s worth, if you didn’t already know, 11.69x8.27 inches is  
the exact size of an A4 page.

Have you checked your printer settings to see if it defaults to A4  
paper? Maybe PDF:Writer is picking up its settings from a printer,  
for some reason…

I’m probably going to start using PDF::Writer myself in the next day  
or so. Even though I want it to default to A4 page size, I’m curious  
about what you’re seeing.

Regards

Dave M.

---

<div class="post-metadata">

**Author:** ![mwhite](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@mwhite](https://www.ruby-forum.com/u/mwhite)\
**Post date:** [November 28, 2005, 2:20pm UTC](https://www.ruby-forum.com/t/re-pdf-writer-page-size/50364/3 "2005-11-28T14:20:21Z")

</div>

On 11/28/05, David M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> For what it’s worth, if you didn’t already know, 11.69x8.27 inches is  
> the exact size of an A4 page.
> 
> Have you checked your printer settings to see if it defaults to A4  
> paper? Maybe PDF:Writer is picking up its settings from a printer,  
> for some reason…

No, it won’t be doing that. PDF::Writer is written entirely in Ruby.  
My suspicion is that there’s something in Matt’s code which is  
creating the document with an A4 size, e.g.:

pdf = PDF::Writer.new(:paper =\> “A4”)

PDF::Writer creates its pages from the exact number of _points_ (about  
1/72 of an inch) and the named paper sizes are merely for convenience.

If PDF::Writer is not given a paper size as above, it will always  
asssume LETTER (U.S. Letter, 8.5" x 11").

## -austin

Austin Z. \* removed\_email\_address@domain.invalid  
\* Alternate: removed\_email\_address@domain.invalid
