David Ng said almost 4 years ago on Creating PDF files with WickedPDF :
Hi, I am trying to add header and footer to the pdf file, but not luck. My controller code :?

//app/contollers/ sales_controller.rb

  def show
    respond_to do |format|
      format.html {}
      format.pdf do
        html = render_to_string(
          template: 'sales/show.pdf.erb', 
          page_size: 'A4',
          margin: { bottom: 25 },
          footer: {
            content: render_to_string('shared/footer')
          layout: 'layouts/application.pdf.erb')
        pdf = WickedPdf.new.pdf_from_string(html)
        send_data(pdf, filename: "sale-#{@sale.our_ref}.pdf", type: 'application/pdf', 
          disposition: :attachment)

// # app/view/shared/footer.html
PRD Footer

What is wrong ?