Solved

Automate the Print to PDF feature and Attach to a Workflow Notification

  • 26 January 2021
  • 4 replies
  • 292 views

Userlevel 4
Badge +10

Hi Folks,

 

I know this has been asked at least once before here but it was back in 2017 and I was wondering if there is a way to automate the print to PDF function in a form. 

 

Thanks and Regards,

Patrick

icon

Best answer by MegaJerk 27 January 2021, 03:38

View original

4 replies

Userlevel 5
Badge +14

As far as I know, if you wanna do PDFs from a workflow then you need to get either some sort of PDF Workflow Action that you can install to your sharepoint environment, or use Nintex's Docgen (https://www.nintex.com/workflow-automation/document-generation/) to automate it. 


Userlevel 4
Badge +10

Thanks @MegaJerk,


 


We did look at docgen but are not able to use it yet. Thanks for the quick response!


 


Regards,


Patrick

Userlevel 5
Badge +14

The only other thing I could think of to do would be to either use something like PDFMake in the Form itself to have users generate PDFs in real time (you'd have to code everything with how the document was to look / how it's arranged, but they have lots of examples on their site for helping with this), OR, still using PDFMake but with a web server like Node.js, create a backend webservice that your workflow could make webrequests to, sending it the info necessary to generate a PDF in that backend, and then doing something with it from there.

Second option is more work than the first, but is more similar to what DocGen is. Neither options are as straight forward as DocGen, but I would feel wrong not mentioning them as viable paths. Especially since I know you are comfortable with using javascript. 


 


Hope this helps! 

Badge +5

Another semi-auto method is to attach a custom ribbon action to the DispForm.aspx form page. The action is a simple Javascript statement: javascript:window.print()

 

We use this method because we want to save the PDF into an existing record.

Reply