This repository was archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Issue rendering pdf #25
Copy link
Copy link
Open
Description
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'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels