The first thing you need to do is create a new page that includes the script to manage the print command, which you associate with a custom action. Perform the following steps to create a new page and add the necessary script:
1. With your site open in SharePoint Designer, create a new ASPX page in the Site Assets (or Site Pages library). Name the page print.aspx. In the following example, the print.aspx page was saved to a library named ProjectX.
2. Copy and paste the code shown in Listing 28.1 into the print.aspx page and then save the page.
You can ...