Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template for automatically generated pages #273

Closed
leolezner opened this issue Aug 30, 2011 · 1 comment
Closed

Template for automatically generated pages #273

leolezner opened this issue Aug 30, 2011 · 1 comment

Comments

@leolezner
Copy link

I'm trying to implement a template for my small invoicing script. I intend to have a more complex template on first page and simple template for all following pages (just the company logo with some lines). If I create the new page with start_new_page, prawn shows the template. But if the content breaks out of the bounding box, the new page will be generated without my template. I've look deeper in the gem, into the file "bounding_box.rb".

  def move_past_bottom
    if @document.page_number == @document.page_count
      @document.start_new_page
    else
      @document.go_to_page(@document.page_number + 1)
    end
  end

The new page is generated without any templates... I would like to use for further pages the second page of my template.

  def move_past_bottom
    if @document.page_number == @document.page_count
      @document.start_new_page :template => 'tpl_invoice.pdf', :template_page => 2
    else
      @document.go_to_page(@document.page_number + 1)
    end
  end
@yob
Copy link
Member

yob commented Dec 8, 2012

Thanks for the report, I'll close this in favour of #375 as there's more discussion there.

@yob yob closed this as completed Dec 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants