Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Issue rendering pdf #25

Open
dstarh opened this issue Dec 16, 2014 · 0 comments
Open

Issue rendering pdf #25

dstarh opened this issue Dec 16, 2014 · 0 comments

Comments

@dstarh
Copy link

dstarh commented Dec 16, 2014

On occasion we get a Shrimp::RenderingError with no other information than that.

Our controller calling Shrimp is relatively simple and works just fine for many of our pdfs but for one in particular it fails some of the time

The code is

url = params[:url] || request.url
    filename = params[:filename].delete(' ') || "report"
    pdf = Shrimp::Phantom.new(url, {}, cookies).to_string!
    cookies['fileDownload'] = 'true' # allow to notify jqueryDownload when download is finished
    send_data pdf,
              filename: "#{filename}_#{Date.today.strftime('%Y%m%d')}",
              type: "application/pdf",
              disposition: "attachment"

and the error is

A Shrimp::RenderingError occurred in pdf#create:

  Rendering Error: 
  app/controllers/pdf_controller.rb:8:in `create'

the backtrace is

  app/controllers/pdf_controller.rb:8:in `create'
  config/initializers/syslog.rb:15:in `log_for_auditing'
  app/controllers/application_controller.rb:103:in `contextual_cobrand'
  app/middleware/images_proxy.rb:15:in `call'
  app/middleware/api_proxy.rb:44:in `call'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant