Ability to save Template component results as PDF

  • 1
  • Idea
  • Updated 5 years ago
Ability to save Template component results as PDF / Email Results Much like the ability to download an XLS output of a table.
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
I want to use this library! http://mrrio.github.io/jsPDF/

StaticResouce?
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
I got this to work with model data if anyone is interested.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
Jacob ... I'm very interested. Are you happy with the results using that library? Did you hit any limitations with page formatting etc.?
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
I have yet to get too far into the templating / formatting. I have used Webmerge in the past for templating, which is PHP based on Smarty.

I also see that your templating within the tool is based on Mustache. There is another path that may make sense, because the jsPDF library has some experimental support for using HTML as the markup. Many paths.

If you would like, I can show you how I got to the Proof of Concept which simply pulls data from the model on the page and shows that it is possible to write the pdf client side, and download the file.

I was quite excited to see a pdf in my download bar, even though the first one only contained "Hello World", a page break and the Viewing User's UID.

Jacob
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
BTW horay for Javascript.
Photo of Ken McElrath

Ken McElrath, Official Rep

  • 1,214 Points 1k badge 2x thumb
Great discussion and idea topic for future iteration of Skuid. As you discover new possibilities, please share, as they may directly influence our design decisions.
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
Yea, I really like the idea of content mirrored in the Template Component and the proposed PDF output.

This is a little bit of a slippery slope, because I may start asking you for a place to store & modify Document templates separate from a component within a page, and accessible from other areas of Salesforce.

Creating print documents has always been an issue with SaaS Databases. (for me and my clients at least)

Jacob