0

I need to convert html to pdf, but the framework must be .net 3.5 because it runs in the context of sharepoint 2010.

I tried TuesPekin but its for .net 4.0 so I need something else.

I need the code to just take a long string of html and generate the PDF, what would u recommend ?

Luis Valencia
  • 32,619
  • 93
  • 286
  • 506

2 Answers2

1

If you struggle with the c# and sharepoint integration then you can do it in the client side with the jsPDF javascript library.

It's very much worth a try.

rtome
  • 1,953
  • 2
  • 22
  • 27
0

I found this library which seems free:

var htmlContent = String.Format("<body>Hello world: {0}</body>", 
        DateTime.Now);
var pdfBytes = (new NReco.PdfGenerator.HtmlToPdfConverter()).GeneratePdf(htmlContent);

http://www.nrecosite.com/pdf_generator_net.aspx

and it worked without any problems.

Luis Valencia
  • 32,619
  • 93
  • 286
  • 506