简体   繁体   中英

Export my SharePoint aspx page to a PDF file

I am working on an enterprise wiki site collection , and using the SharePoint designer I have manually added a link named “Print to PDF” as follow:-

在此处输入图片说明

But I am trying to implement the link functionalities, so when the user clink on the link, the page content (mainly any html components that are inside the rich text ) should be displayed inside a pdf file?

Can anyone advice how I can achieve this ,, can I write a javaScript code which can do the work ? Thanks

You can develop an ASPX page (actually preferably an ASHX handler) that does the work for you by accepting an URL to convert, which you then pass into a third party HTML to PDF library. The generated PDF file can then be returned to the user's browser.

Alternatively, have a look at this blog post ( that I wrote, so big fat disclaimer about me being biased ) that shows how you can buy a product off the shelf that does all the work for you.

You can read more about it here .

BTW, for questions related to SharePoint you may want to consider using sharepoint.stackexchange.com .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM