title: Image header on PDF using wicked_pdf gem and wkhtmltopdf
body: <p>My controller: </p>
  
  <pre><code>  def show
      respond_to do |format|
      format.pdf do
      #render :pdf =&gt; "show",:template =&gt; "welcome/show",:footer =&gt; { :right =&gt; 'Page [page] of [topage]' })
      #render :pdf =&gt; "show",:template =&gt; "welcome/show", :header =&gt; {:content =&gt; render_to_string({:template =&gt; 'welcome/pdf_header.html.erb'})}, :footer=&gt; { :right =&gt; 'Page [page] of [topage]' },:margin =&gt; { :top =&gt; 38, :bottom =&gt; 35}
      #render :pdf =&gt; "show",:handlers =&gt; [:html],:template =&gt; "welcome/show.pdf.erb", :header =&gt; {:content =&gt; render_to_string({:layout =&gt; 'pdf_header.html.erb'})}, :footer=&gt; { :right =&gt; 'Page [page] of [topage]' },:margin =&gt; { :top =&gt; 38, :bottom =&gt; 35}
      render :pdf =&gt; "show",:template =&gt; "welcome/show.pdf.erb", :header =&gt; {:content =&gt; ActionController::Base.new().render_to_string({:template =&gt; 'welcome/pdf_header.html.erb', :layout =&gt; false})}, :footer=&gt; { :right =&gt; 'Page [page] of [topage]' },:margin =&gt; { :top =&gt; 38, :bottom =&gt; 35}
      end 
    end
  end
  </code></pre>
  
  <p>I'm getting the PDF along with page numbers, but I can't get the image header.</p>
  
  <p>This is the layout:</p>
  
  <p>pdf_header.html.erb</p>
  
  <pre><code>&lt;%= image_tag  "gla/image.jpg" ,:width =&gt; "90",  :height=&gt;"85" %&gt;
  &lt;%#= wicked_pdf_image_tag  "gla/image.jpg" %&gt;
  </code></pre>
  
  <p>Once I open pdf_header as an HTML file I get the image displayed, but once I call the PDF I'm not able to display the image</p>
  
  <p>In the console I get this </p>
  
  <pre><code>Started GET "/welcome/show.pdf" for 127.0.0.1 at 2014-04-17 09:47:05 +0530
    Processing by WelcomeController#show as PDF
  Rendered welcome/pdf_header.html.erb (0.4ms)
  ***************WICKED***************
  Rendered welcome/show.pdf.erb (0.7ms)
  Rendered text template (0.0ms)
  Sent data show.pdf (1.8ms)
  Completed 200 OK in 782ms (Views: 1.3ms | ActiveRecord: 0.0ms)
  </code></pre>
  
  <p>The commented stuff is what I have tried and not was successful.
  <strong>Is there another way to display an image directly in the header by giving the path of the image instead of passing it via the html?</strong></p>