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

Issue rendering pdf #25

@dstarh

Description

@dstarh

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions