My goal is the create a model method that will generate a pdf of a
html.erb form as a delayed job task.
What I have tried:
I have tried using PDFKit with the middleware to render a PDF from the
url of the view. AKA
pdf = PDFKit.new("www.mysite.com/models/1/othermodels/1.pdf")
However, my site rests behind authentication. So in this case the pdf
that is generated is just my authentication challenge.
I attempted to use WickedPDF, PDFKit, and Prawn to generate the pdf in
the background using templates (require 'erb') etc. However, this
results in issues with converting each do blocks into strings.
Walther, Thanks for your response. So just so I am clear, I'd use
"acts_like_flying_saucer" gem and itext?
The one catch to this is I am using Heroku for my production environment
so I need to have the files saves to Amazon S3. Is this possible with
your proposed solutIon?
Currently I am just using the PDFKit gem which, using middleware,
generates pdfs on the fly for all of my reports. However, I need to make
a background task(delayed job) in ruby that can go retrieve all of the
pdfs and save them to Amazon s3.
Trying to find the most straight forward solution.