title: Inserting external PDF into Prawn generated document
body: <p>How can I insert an existing PDF into a Prawn generated document? I am generating a pdf for a bill (as a view), and that bill can have many attachments (png, jpg, or pdf). How can I insert/embed/include those external pdf attachments in my generated document? I've read the manual, looked over the source code, and searched online, but no luck so far.</p>
  
  <p>The closest hint I've found is to use ImageMagick or something similar to convert the pdf to another format, but since I don't need to resize/manipulate the document, that seems wasteful. The old way to do it seems to be through templates, but my understanding is that the code for templating is unstable.</p>
  
  <p>Does anyone know how to include PDF pages in a Prawn generated PDF? If Prawn won't do this, do you know of any supplementary gems that will? If someone can point me towards something like prawn-templates but more reliable, that would be awesome.</p>
  
  <p>Edit: I am using prawnto and prawn to render PDF views in Rails 4.2.0 with Ruby 2.2.0.</p>
  
  <hr>
  
  <p>Strategies that I've found but that seem inapplicable/too messy:</p>
  
  <ul>
  <li><p>Create a jpg preview of a PDF on upload, include that in the generated document (downsides: no text selection/searching, expensive). This is currently my favorite option, but I don't like it.</p></li>
  <li><p>prawn-templates (downside: unstable, unmaintained codebase; this is a business-critical application)</p></li>
  <li><p>Merge PDFs through a gem like 'combine-pdf'–I can't figure out how to make this work for rendering a view with the external PDFs inserted at specific places (the generated pdf is a collection of bills, and I need them to follow the bill they're attached to)</p></li>
  </ul>