Answered by:
Save or Download as PDF

Question
-
Hi,
I am working hard on one of the sharepoint customization. My requirement is:
I have button called "Save to PDF" on clicking that button the contents of the current webpart/page should go into the PDF.
Can anybody suggest me on this task? Is there anything outofbox is available? (or may be how can I achieve through the customization?)
I really appreciate your ideas or any thoughts regarding this.
Regards,
Monday, November 29, 2010 12:39 PM
Answers
-
I have used Aspose http://www.aspose.com/ for PDF conversion in SharePoint 2007, its pretty good.
also keep in mind PDF conversion available within Word Automation Services, for list of supported file types see http://msdn.microsoft.com/en-us/library/ee558830.aspx
Microsoft Certified Master | SharePoint 2007
Blog- Proposed as answer by Clayton Cobb Monday, November 29, 2010 5:50 PM
- Marked as answer by Hiren Patel Wednesday, December 1, 2010 11:38 AM
Monday, November 29, 2010 5:15 PM -
No its asynchronous, you can sort of poll in your code after a conversion is submitted to provide synchronous like experience, but I wouldn't recommend, you could also have a status page that shows status of all conversion requests submitted
It wont prompt for save as dialog, once conversion request is submitted you are telling at that time what format you want to convert to, engine will convert and store it in output document library you specify when conversion was submitted
Microsoft Certified Master | SharePoint 2007
Blog- Marked as answer by Hiren Patel Thursday, December 2, 2010 7:50 AM
Thursday, December 2, 2010 7:36 AM
All replies
-
It's not simple to implement server side (you will nee a PDF automation tool and this is not obvious/free, you will also have trouble adjusting the design).
On the client side, you could simply call the javascript print() function and it will open the print menu. Then the users can choose either a printer or the XPS writer (if it's installed) or a "PDF printer" (there are a few PDF tools that install as a fake printer, PDF creater is an example of a free tool that does this http://www.pdfforge.org/download). This way you will also benefit from mediaprint (which hides the menus, the ribbon) but you can disable it if you want.
Florin DUCA - MCSE 2003 +Sec,MCTS conf/dev WSS3/MOSS, MCITP/MCPD SP 2010, MCPD ASP.Net 3.5, MCTS ISA 2006 - Logica Business Consulting, France- Proposed as answer by Clayton Cobb Monday, November 29, 2010 4:46 PM
Monday, November 29, 2010 1:14 PM -
Concur with Florin. You can buy something like Muhimbi, try to code your own version of Muhimbi, or just do it client side for no time, effort, or money.
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task ForceMonday, November 29, 2010 4:46 PM -
I have used Aspose http://www.aspose.com/ for PDF conversion in SharePoint 2007, its pretty good.
also keep in mind PDF conversion available within Word Automation Services, for list of supported file types see http://msdn.microsoft.com/en-us/library/ee558830.aspx
Microsoft Certified Master | SharePoint 2007
Blog- Proposed as answer by Clayton Cobb Monday, November 29, 2010 5:50 PM
- Marked as answer by Hiren Patel Wednesday, December 1, 2010 11:38 AM
Monday, November 29, 2010 5:15 PM -
Check out http://blog.muhimbi.com/2010/09/convert-html-pages-to-pdf-format-using.html. It does exactly what you need from the SharePoint GUI as well as workflows, hyperlinks and web service calls.
It does a lot of extra as well including watermarking and conversion of many Office document formats, but you may not be interested in that.
Tuesday, November 30, 2010 10:03 AM -
if you want to go down the approach of creating something server side with a PDF writer - I have looked at quite a few and PDFCreator is the most appropriate for my use because:
- it will create a PDF without user intervention. Most others (such as Primo PDF) require the user to specify the file name of the PDF file which is no good if you want to automate this process
- You can set up a number of virtual printers with different page settings...
Tuesday, November 30, 2010 10:28 AM -
Hi Ram,
I am thinking of converting current webpage into .mht file and then convert into .pdf by word automation service.
Is there any setting or option in the service which can convert on the fly(on clicking the button it should prompt for saving the document as pdf)? As per my knowledge Word Automation Service accepts the parameter as "document library or document" as input parameter and when job is completed it converts into PDF file and stored into document library.
Is it possible by word automation service which convert webpage to .mht and .mht to .pdf on the fly?
Could you please share your thoughts?
Regards,
Wednesday, December 1, 2010 11:53 AM -
Default there is no UI integration to kick off PDF conversion on the fly, you will need to write code to submit conversion requests. You can have a custom ECB menu item that fires up an application page that can contain the logic to submit conversion requests
Have a look at the links below
http://msdn.microsoft.com/en-us/library/ee558830.aspx
Microsoft Certified Master | SharePoint 2007
BlogWednesday, December 1, 2010 8:00 PM -
Hi Ram,
Thanks for the prompt reply...
I have few queries if you can share your thoughts:
1. Is Word Automation Service convert the PDF on the fly? (Instantly). The service is running by job which runs @ schedule time.
2. Is it prompt for 'Save As' Dialog box for saving the document.
Regards,
Thursday, December 2, 2010 7:09 AM -
No its asynchronous, you can sort of poll in your code after a conversion is submitted to provide synchronous like experience, but I wouldn't recommend, you could also have a status page that shows status of all conversion requests submitted
It wont prompt for save as dialog, once conversion request is submitted you are telling at that time what format you want to convert to, engine will convert and store it in output document library you specify when conversion was submitted
Microsoft Certified Master | SharePoint 2007
Blog- Marked as answer by Hiren Patel Thursday, December 2, 2010 7:50 AM
Thursday, December 2, 2010 7:36 AM