3

Is there any 3rd party tool available that would convert SharePoint pages to PDF or any custom code that converts pages to pdf?

1

You can check a tool from Muhimbi called PDF converter.

Also have a look on this one; https://blogs.msdn.microsoft.com/thomsven/2011/09/09/export-sharepoint-wiki-to-wordpdf-without-3rd-party-tools/

  • I can vouch for the Muhimbi tool. It does the conversions well – Michael Colbs Nov 21 '16 at 17:25
0

I think your best bet would be to use a "Print to PDF" tool. There are a few programs that can do this:

  • In Windows 10, "Microsoft Print to PDF" is built in
  • Google Chrome has that functionality built in
  • CutePDF Writer - A free program I have used for years that works with just about any OS
  • Web2PDF - Convert externally available websites to PDF without needing to install anything. Never used this before, just found it after a quick search.
0

If you'd like to write some custom code, a good option is iTextSharp. I've been using it for years and you can dynamically create PDFs pretty easily:

protected void Page_Load(object sender, EventArgs e)
{
    Document document = new Document();
    try
    {
        PdfWriter.GetInstance(document, new FileStream("c:\\my.pdf", FileMode.Create));
        document.Open();
        WebClient wc = new WebClient();
        string htmlText =     wc.DownloadString("http://localhost:59500/my.html");
        Response.Write(htmlText);
        List<IElement> htmlarraylist = HTMLWorker.ParseToList(new    StringReader(htmlText), null);
        for (int k = 0; k < htmlarraylist.Count; k++)
        {
            document.Add((IElement)htmlarraylist[k]);
        }

        document.Close();
    }
    catch
    {
    }
}

https://stackoverflow.com/questions/2822843/itextsharp-html-to-pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.