I have a webpart that is specialized business calculator. Once the user puts in the details of the contract, they need to save the web part (in pdf format) as part of the contract documentation. I have a button on the web part to initiate the request.
Specifically, I’d only want to save the web part contents, with none of the SharePoint chrome. Using a “pdf print driver” is not an option, as I cannot load additional software on the users' computer. Similarly, I don’t think a web service will work either, but am open to it as long as it is transparent to the user. The file will eventually be loaded in a non-SharePoint document repository, so it just needs to be downloaded to the browser, letting the user to save it to a temporary location before uploading it to the document repository.
The web part is a visual web part (farm solution user control) and is used in both MOSS and SP2010.
UPDATE (10/12/2011): I have successfully used iTextSharp to create a Pdf file and send it to the browser. The issue I still have is getting the html from my webpart into the HtmlTextWriter so I can pass the InnerWriter to iTextSharp. It works if I just pass in a single, simple control (like label), but once I try to pass in the full usercontrol, which has many Telerik controls (RadUpdatePanel, RadComboBox, RadTextBox, RadCalendar, etc.), I get the following error: Script control 'RadAjaxLoadingPanel1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
How do I get a valid string of html that I can pass to iTextSharp?