Giter Site home page Giter Site logo

Comments (6)

unixmonkey avatar unixmonkey commented on August 27, 2024

The header line looks good to me, is shared/voucher_header.html.erb right? or is it shared/_voucher_header.html.erb?
Usually shared is a place to put partials. Passing :template assumes a full correct filename, not the magic stripping of the leading underscore like render :partial does.

Not sure about your issue with images, does windows not work with file:// descriptors?
You can check what is actually being rendered in the html by passing :debug => true in your render.

from wicked_pdf.

mperez123 avatar mperez123 commented on August 27, 2024

Thank you very much.

from wicked_pdf.

mperez123 avatar mperez123 commented on August 27, 2024

When I paste the url generated in browser this show the image correctly. However in image tag donยดt show the image.

from wicked_pdf.

unixmonkey avatar unixmonkey commented on August 27, 2024

Are you using wicked_pdf_image_tag or just image_tag? You can try defining a new helper as mentioned here:
#1

def pdf_image_tag(image, options = {})
  options[:src] = File.expand_path(RAILS_ROOT) + '/public/images/' + image_tag(:img, options)
end

I guess I should really try and get a windows computer together to test this stuff better on that platform

from wicked_pdf.

mperez123 avatar mperez123 commented on August 27, 2024

Thanks. I am using pdf_image_tag on windows. My problem now is how could i generate multipages pdf with a standard header and footer (I need repeat these).

from wicked_pdf.

unixmonkey avatar unixmonkey commented on August 27, 2024

You have a lot of flexibility in specifying your headers and footers.
Here, the header is a template, and the footer is built up with some standard text.

render :pdf => 'file',
            :header =>  { :html => { :template => 'shared/header.pdf.erb' } },
            :footer   => {:left => 'REPORT',
                                 :center => Time.now.to_s(:db),
                                 :right => '[page] of [topage]'}

from wicked_pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.