What is the best way to generate pdf files via webservice? [closed]

0

I have a Soap webservice and I came across the need to generate pdf documents. Has anyone worked with generating many documents via webservice and what technologies have they used? Which technologies have achieved better performance, workability etc (which were: use of a given Framework, creation of scheduled routines on the server, calls of asynchronous methods etc)?

    
asked by anonymous 05.05.2016 / 15:14

1 answer

3

I'm working on this right now. And the simplest thing to generate PDF from an HTML and worked very well with me, is the NReco .PdfGenerator .

Free, fast, and easy to use.

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

Or even straight from a URL:

htmlToPdf.GeneratePdfFromFile("http://www.nrecosite.com/", null, "export.pdf");
    
05.05.2016 / 15:22