0
votes

I have a rails app using Prawn to generate a PDF and I need to set the PDF to a vertical orientation with an 8.5 x 11 png image on each page (there will be 3).

What would be the best way to make sure these images fit the constraints of the PDF? I beleive I can use a bounding box to control the position but I'm having a hard time wrapping my mind around the code behind it. I'll keep pouring over the docs but if anyone has a suggestion on to get 3 8.5x11 images to display on each page that'd be great.

1

1 Answers

0
votes

I was able to figure this out by calling arguments in a hash inside of the initialize method for my pdf

def initialize
    super(:page_size=> "A4",:top_margin => 80,:bottom_margin => 40,:template => 'public/template.pdf')
    #your pdf code goes here

  end