Save SharePoint .aspx page into pdf

Hi All,

I have below requirement to add on SharePoint page

  1. Have a PDF icon on SharePoint page & on click it export the page as a PDF document.
  2. Have a printer icon on SharePoint page & on click it allows user to print the content of the page.
  3. Have a send email icon on SharePoint page & on click it sends user the content of the page.

Can we do it without any third party solution?

October 6th, 2012 8:06pm

Hi,

  1. Have a PDF icon on SharePoint page & on click it export the page as a PDF document.

there is no function like this in sharepoint so you need to go with custom .Net solution or third party

  1. Have a printer icon on SharePoint page & on click it allows user to print the content of the page.

this is doable by using javascript and Window.print() Method

  1. Have a send email icon on SharePoint page & on click it sends user the content of the page.

Can we do it without any third party solution?

this is doable by using JavaScript and mailto:

Free Windows Admin Tool Kit Click here and download it now
October 7th, 2012 12:41pm

You can create an user control with three button images (for Pdf, Print and Mail). On the click event of the button image (pdf) you can write the following code to read html stream of the page, convert it into open XML and then use the following snippet to convert OpenXml it into pdf files

//Variables used by the sample code.
ConversionJobSettings jobSettings;
ConversionJob pdfConversion;
string wordFile;
string pdfFile;

// Initialize the conversion settings.
jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;

// Create the conversion job using the settings.
pdfConversion =
  new ConversionJob("Word Automation Services", jobSettings);

// Set the credentials to use when running the conversion job.
pdfConversion.UserToken = properties.Web.CurrentUser.UserToken;

October 8th, 2012 6:42am

Hi All,

Let me clarify that for the first point I want to convert SharePoint .aspx page into pdf.

Free Windows Admin Tool Kit Click here and download it now
October 9th, 2012 2:32am

Hi Somnath,

Following replies has give you the correct direction to convert page into pdf, in SharePoint, convert file use Word Automation Service, please pay attention to it to check whether it works.

October 21st, 2012 1:06pm

Hi Qiao Wei,

I am able to convert ASPX page into PDF; however generated PDF shows data in scattered manner and controls are showing below error message

Error! Cannot read or display file.

Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 5:31am

Hi

I have exactly the same requirement. Did you find any solution ?

Thanks

Christophe Sarteel

SharePoint consultant

August 28th, 2015 9:51am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics