Render Skuid pages as PDF

  • 34
  • Idea
  • Updated 9 months ago
  • Under Consideration
  • (Edited)
(via EvanDonavan from github.com/skuidify)

"Can a Skuid page be rendered as PDF using the Visualforce renderAs property?

If not, would that be difficult to add?

My proposed use case is for a custom student transcript page that I would like to create for which I would like to include a table of the student's courses taken, sorted by term, and excluding any that have not yet completed. I could write custom Apex code to do this, but it seems like the Skuid models could generate the necessary SOQL for the filter conditions without that. It just wouldn't be a PDF currently."

Developer Zach replies: "This would be a killer feature to have. We'll look into it!" and "We're considering adding an option to the Skuid Table component to allow its data to be exported as PDF -- we could definitely pursue additional components / entire pages being rendered in this manner in the future."
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb

Posted 6 years ago

  • 34
Photo of Gregg Baxter

Gregg Baxter, Official Rep

  • 3,080 Points 3k badge 2x thumb
Any news on the PDF print option for Skuid yet Anna?
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
I would also like to have this feature! Any updates or workarounds to get a skuid page to pdf?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
We have done some initial exploration of this possibility but run into enough problems that we decided to set it aside in favor of more actionable targets.  We totally recognize the need for this and our executives pretty regularly glare at us for not having delivered yet...  I'll consider your voice added to the chior. 
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
I totally understand the struggle on this one....

I come from a MVC .NET c# background and used to have to do this all the time and it was very very difficult until this guy made this component. Not sure if it will help at all or if it might spawn up Ideas but there is a component (Free) out there that I used all the time in Dev on .NET MVC. All I had to do was feed it HTML and it would take care of the rest...

The component I used was called WKHTMLTOPDF and this guy made a .NET wrapper for it but the source WKHTMLTOPDF is open and not just for .NET. 

Maybe some super Dev out there can wire up something like this for Force.com and just dump HTML to it and poof ... PDF :)


https://github.com/tuespetre/TuesPechkin

https://github.com/wkhtmltopdf/wkhtmltopdf
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb
+1
Photo of Jennifer Harris

Jennifer Harris

  • 182 Points 100 badge 2x thumb
+1
I am evaluating Skuid and thought this would be native capability...I'd hate to have to go build a Visualforce form. Charts output to PDF, so I'm hoping we'll see this soon. I would like to produce a meeting agenda and attach it to the record as a PDF.
Photo of KVin

KVin

  • 1,158 Points 1k badge 2x thumb
+1

Great to have such feature.
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
+100 :)
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
There are some ideas in this Idea thread (specific to pdf generation)
https://community.skuid.com/skuid/topics/idea-page-to-print-page-to-pdf-page-to-email-page-to-conten...

We went the DocRaptor route and wrote an Apex class that waits for DocRaptor to return the pdf, then we grab it and attach it to the record of choice (we pass id in our snippet, along with the custom Name we want the document called.)  It is working great for us - downside is you pay DocRaptor per document (not licensed user.)  For us it ended up being a fraction of the cost and SO much faster then another popular Salesforce pdf generating tool that rhymes with Bonga.

So basically we create our "document" in a Skuid page - with all the flexibility that Skuid provides, then send all that content to DocRaptor, which returns the pdf.

That said, we would love to have this native in Skuid!!
Photo of Sam Becker

Sam Becker

  • 1,158 Points 1k badge 2x thumb
Hello, and thank you for this wonderful post. We have been trying to get away from Drawloop and this is the perfect solution. I got the script working with DocRaptor, but I can't figure out how to get Salesforce to auto-attach the document to the record. Could you elaborate on how you did this? 

Thank you!
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
Sam - Chandra outlined this here: https://community.skuid.com/skuid/topics/idea-page-to-print-page-to-pdf-page-to-email-page-to-conten...

about halfway down, look for global class AFLattachAsPDF
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
Thanks Chandra! I am testing it out now. Pretty straight forward to get set up. The issue I am running into is my Graphs/Charts are not fitting on the page. I.E. the margin is big on the left and so the chart is getting cut off in October instead of showing all the way to February. Have you figured out the best place to tweak the CSS to keep the width of a chart all on the same page? Thank you for your help!
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
Amazingly helpful and thorough! And so quick! You are awesome!!! Thank you so much for your help! Appreciated beyond belief!
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
Follow up question. Any luck with images? I have tried three different methods and all do not work.

1. I have a template that shows a picture of the user. I am using img src = and it returns the full absolute URL of the users picture. (as suggested by DocRaptor)
2. I have also tried Tables with "Photo VIew" set so I am only seeing pictures of my assets.
3. I also tried the image component.

Those pictures show up fine in the Skuid view but don't show up at all in DocRaptor. I have submitted a question to DocRaptor but wondered if you had overcome this issue yet. If not I will continue figuring this one out and post when I come up with a solution.

Thanks!
Rich
(Edited)
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
DocRaptor's response was:
"Your images aren't loading for me in my browser. It looks like they require you to be logged in to load, and obviously our render is not logged in on that server. We have to have access for them to appear. "

ME:
Can you point me to any direction on using Salesforce with your service. All my information is coming out of Salesforce via VisualForce pages. DocRaptor is accessing all the other information on the page from Salesforce and it is coming over fine. Can DocRaptor access the picture info or do I have to go with a private server option like Prince?

DocRaptor:
"We use Prince as our PDF renderer (but have a separate and much better JavaScript parser). I don't think Prince will help you in this situation.

Somehow, you are grabbing the HTML of the page and sending us that HTML. Your only real option to get the images is to also get the images and send them to us as part of your HTML. I'd recommend using bae64 encoding to pass us the images."
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
We use a company logo image on some of our reports but have the images hosted on a part of our external company website, which is publicly accessible.  That doesn't help for your profile images, so keep me posted on what you do in case we run into a similar problem!
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
Oh - for our Skuidified community, we found we had to put images in salesforce "Documents" and mark "Externally Available Image" to true in order for community users to see it.  That may be another option for you.
Photo of Arpit

Arpit

  • 1,514 Points 1k badge 2x thumb
This reply was created from a merged topic originally titled Skuid Page as PDF !!.

Hello,

In skuid Can we save our skuid page in PDF format like we do in VF pages by using Render As attributes?

Please tell me how we can do this?I want to save my Skuid Page in PDF format.

Looking ahead for an quick Response,

Thanks.