# Pdf::Writer ; page numbering, and table wrapping

**URL:** <https://www.ruby-forum.com/t/pdf-writer-page-numbering-and-table-wrapping/89064>\
**Category:** Rails\
**Created:** [January 3, 2006, 9:18pm UTC](https://www.ruby-forum.com/t/pdf-writer-page-numbering-and-table-wrapping/89064 "2006-01-03T21:18:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jshow](https://www.ruby-forum.com/u/jshow)\
**Post date:** [January 3, 2006, 9:18pm UTC](https://www.ruby-forum.com/t/pdf-writer-page-numbering-and-table-wrapping/89064/1 "2006-01-03T21:18:29Z")

</div>

Hey there,

I know this isn’t a pdf::writer list - If there’s a more appropriate  
place for me to ask these questions I’d appreciate being set straight.

I’m having a couple of misunderstandings/isssues first with page numbers  
and secondly with auto-wrapping of simple\_table.

First

pdf.start\_page\_numbering(pdf.margin\_x\_middle,  
pdf.absolute\_bottom\_margin, 9, :center, nil, nil)

Using the default ‘pattern’, is rendering ‘x of N+1’ - or specifically  
it always thinks that is 1 greater than the number of  
pages in the document. I’ve rendered 1, 2 and 3 page documents, and it  
responds with “1 of 2”, “1 of 3”, “1 of 4”, etc. Using the pattern  
string (’ of ’ results in the same output.

Secondly,

the auto-wrapping of tables, runs directly into both the before  
mentioned page numbers, and into a header added via add\_object(…,  
:all\_pages).

Is there a way to configure the auto-wrapping of tables to skip a Y? I’m  
configuring the other paths, so I do know in advance where wrapping  
should start, and begin.

Thanx for any thoughts.

cheers,  
Jodi

---

<div class="post-metadata">

**Author:** ![jshow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jshow](https://www.ruby-forum.com/u/jshow)\
**Post date:** [January 3, 2006, 10:34pm UTC](https://www.ruby-forum.com/t/pdf-writer-page-numbering-and-table-wrapping/89064/2 "2006-01-03T22:34:58Z")

</div>

[http://rubyforge.org/mailman/listinfo/ruby-pdf-discuss](http://rubyforge.org/mailman/listinfo/ruby-pdf-discuss)

The page numbering issue is a known bug that I will be fixing. I am  
not sure what you’re asking on the second item.

-austin

On 03/01/06, Jodi S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> pdf.start\_page\_numbering(pdf.margin\_x\_middle,  
> the auto-wrapping of tables, runs directly into both the before  
> Jodi
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

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

---

<div class="post-metadata">

**Author:** ![jshow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jshow](https://www.ruby-forum.com/u/jshow)\
**Post date:** [September 14, 2007, 10:05am UTC](https://www.ruby-forum.com/t/pdf-writer-page-numbering-and-table-wrapping/89064/3 "2007-09-14T10:05:56Z")

</div>

Austin Z. wrote:

> [http://rubyforge.org/mailman/listinfo/ruby-pdf-discuss](http://rubyforge.org/mailman/listinfo/ruby-pdf-discuss)
> 
> The page numbering issue is a known bug that I will be fixing. I am  
> not sure what you’re asking on the second item.
> 
> -austin
> 
> On 03/01/06, Jodi S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > pdf.start\_page\_numbering(pdf.margin\_x\_middle,  
> > the auto-wrapping of tables, runs directly into both the before  
> > Jodi
> > 
> > –  
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> > 
> > * * *
> > 
> > Rails mailing list  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> –  
> Austin Z. \* removed\_email\_address@domain.invalid  
> \* Alternate: removed\_email\_address@domain.invalid

To fix the page numbering issue add the following before your program  
exits

pdf.stop\_page\_numbering(true)

JB
