Пример #1
0
        public IHttpActionResult ConvertUrlToPdf(PdfRequestModel request)
        {
            var mappedPath = System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data") + "\\" + request.OutputFileName;
            var wkhtmlPath = System.Web.Hosting.HostingEnvironment.MapPath("~/Bin") + "\\wkhtmltopdf";
            var response   = WkHtmlWrapper.CreatePdfFromUrl(request.Url, mappedPath, wkhtmlPath);

            return(Ok(response));
        }
Пример #2
0
 static void Main(string[] args)
 {
     //google test
     WkHtmlWrapper.CreatePdfFromUrl("www.google.com", "google.pdf");
     WkHtmlWrapper.CreatePdfFromUrl("www.yahoo.com", "yahoo.pdf");
 }