0

I have a requirement that requires that all .aspx pages in my 'Pages' library (Publishing Site) are printed every so often so that a physical record of that publishing page can be kept.

Would it be possible to accomplish this using PowerShell bearing in mind I need the contents of the webpage to be PDF'd and not the raw HTML.

I have come across this script by Keith Tuomi: Print all Documents in SharePoint Library PowerShell. However this doesn't specify whether it will work with .aspx pages. I have yet to test this out in my environment.

Is there another way I can accomplish this, maybe by using a workflow action? Or could someone confirm that the above script works with .aspx pages in the way I would like.

Thanks.

  • 1
    I don't see how that script would help you much. Sure, script that iterates all items on SharePoint list is trivial, your challenge is more on how to get the HTML to PDF in webpage view, and not as text. – Jussi Palo Jun 18 '15 at 19:41
0

I would perhaps create a WinForms application that contains WebBrowser control and logic to connect to SharePoint, and that iterates through all pages in the pages library rendering them in the WebBrowser control.

You can print WebBrowser contents using WebBrowser.Print, and if you have PDF printer endpoint in the system, it would basically print the SharePoint web pages one by one into PDF files.

  • Do you know how to pass SharePoint credentials to WebBrowser object? I can't make it working with https. – tsap Mar 31 '16 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.