0

I'm trying to understand the difference between the SP add-ins and SP Framework. I need to refactor a Django app on SP online. The web app does the following:

  • Takes input from the user into a form (mostly y/n) questions
  • based on the responses generates a pdf document which is returned to the user plus a .docx document which is stored on SP (the end user has no access to the .docx)
  • Potentially sends an email to notify other stakeholders

Now, if I have to implement it on SP, I understand that the full logic will be in the client, while at the moment for example part of the logic runs in Python.

The form itself should not be an issue. I was wondering how to generate the pdf and the docx. Is that possible using SP workflows? Or should I use Power Automate? I mean, how to properly populate a HTML/word template and then convert it to Pdf if we have no access to server side code? Thanks

Mauro
  • 102
  • 14
  • 1
    Questions about software recommendations are off topic. There are several different ways to achieve what you describe. Pick one, then make it work and ask a question if you get stuck. – teylyn Aug 16 '20 at 08:16

2 Answers2

0

You can create a SharePoint Application using spfx framework https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview and the client side code can call server side APIs. You could use any backend to take the Form submission and return a generated PDF file.

astanley86
  • 313
  • 1
  • 2
  • 11
0

Please find below my thoughts:

-UI and backend base logic(capturing form data) you can do with SpFx.

  • PDF Generation: There are few client side js scripts(e.g., jspdf) available to generate a pdf. This can be done from SpFx. We did generated this one of the project but it was console app using csom.(but we used js files for pdf generation)
  • Word file generation: Power Automate can be handy here, which uses a premium connector to convert. You might need to rely on onedrive for that.

Or

  • Azure Function: you can write Azure Function for the conversion logic(pdf/docx)
  • API: as astanley86 said, you can create the API (takes care of conversion) and call it from spfx

SpFx is the modern development approach which is recommended by MS. SP Add-in has few cons which you can easily find from knowledge base.

Dharman
  • 30,962
  • 25
  • 85
  • 135