# Help with PDF:Writer (write in new page)

**URL:** <https://www.ruby-forum.com/t/help-with-pdf-writer-write-in-new-page/127341>\
**Category:** Rails\
**Created:** [January 28, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/help-with-pdf-writer-write-in-new-page/127341 "2008-01-28T14:17:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [January 28, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/help-with-pdf-writer-write-in-new-page/127341/1 "2008-01-28T14:17:53Z")

</div>

I want to do a list of reports, so each report should be in a different  
pdf page. How can I make that I want to finishing writing in the current  
page and I want the rest of the pdf in another page, but in the same  
document?

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [January 28, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/help-with-pdf-writer-write-in-new-page/127341/2 "2008-01-28T15:23:25Z")

</div>

Try:

pdf.start\_new\_page

(details at [http://ruby-pdf.rubyforge.org/pdf-writer/](http://ruby-pdf.rubyforge.org/pdf-writer/))

On Jan 28, 8:17 am, John S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [January 28, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/help-with-pdf-writer-write-in-new-page/127341/3 "2008-01-28T15:25:29Z")

</div>

John S. wrote:

> I want to do a list of reports, so each report should be in a different  
> pdf page. How can I make that I want to finishing writing in the current  
> page and I want the rest of the pdf in another page, but in the same  
> document?

start\_new\_page(force = false)

Starts a new page or column. If you pass it ‘true’ it will always start  
a new page, even in multi-column situations. The following code will  
produce ‘hello’ on one page, and ‘world’ on the next:

require “pdf/writer”

pdf = PDF::Writer.new  
pdf.text “hello”  
pdf.start\_new\_page  
pdf.text “world”

pdf.save\_as(“hello.pdf”)
