I am trying to create and download a simple pdf using MVC but am having problems.
With Htmltopdf.converturl it just times out or loads comaniestopdf as an empty page
Quote:
[HttpPost]
public void CompaniesToPdf()
{
//no result, times out.
string url = "http://www.google.com";
PdfDocument doc = new PdfDocument();
HtmlToPdf.Options.NoScript = true;
HtmlToPdf.ConvertUrl(url, doc);
}
With HtmlToPdf.ConvertHtml it creates and downloads a pdf but it is completely empty.
Quote: [HttpPost]
[RenderAsPDF]
public void CompaniesToPdf()
{
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertHtml("test", doc);
}
Can you please help me sort out the syntax?