I would like to know if it is possible to automate the process of saving a SharePoint site page as a pdf and then saving this pdf into a document library. Currently to do this I have to print the page (ctrl+p) and choose the option to save as pdf. Then once saved to my pc I upload the pdf file to the document library. Is it possible to have a webpart or button on the site page, which automatically does this for me using custom code?
You can use OneDrive and MS Flow to realize your design.
Please follwo steps:
- Use shortcut keys：Ctrl + P to save SharePoint Site Page as PDF
- Click Print and save print output as OneDrive Sync Field
- Note: In my environment, OneDrive has been synchronized with File Explorer in Windows
- More information, please refer to Sync files with OneDrive in Windows.
- Sign in OneDrive Online, click Automate menu, and then select Power Automate to create a flow
- Create a flow:
- Add a Trigger "When a file is created (OneDrive)"
- Add anAction "Create file (SharePoint)"
- Add anAction "Delete file (OneDrive)"
- Save and Test this flow