I'm using Select PDF - Community Edition to render the output of a web page (e.g. document). When I view the PDF...the data in the grids are empty.
- And yes, the grid data does render when viewed normally
- As a side-note...I am using Kendo Grids
As an experiment...I set the "MinPageLoadTime" property to 15 seconds...it does indeed take 15 seconds for the SAVE to execute...but oddly, still no records are displayed in the PDF's rendering of the grid.
public byte[] ToPDF(IPdfConverterArgs args)
{
if (args == null)
throw new ArgumentNullException();
if (!(args is SelectPdfUrlConverterArgs))
throw new ArgumentException(string.Format("Args.Type '{0}' is not a valid type.", typeof(SelectPdfUrlConverterArgs).Name));
var arguments = args as SelectPdfUrlConverterArgs;
if (string.IsNullOrWhiteSpace(arguments.Url))
throw new ArgumentNullException();
var pdfPageSize = (PdfPageSize)Enum.Parse(typeof(PdfPageSize), arguments.PdfPageSize, true);
var pdfOrientation = (PdfPageOrientation)Enum.Parse(typeof(PdfPageOrientation), arguments.PdfOrientation, true);
HtmlToPdf converter = new HtmlToPdf();
converter.Options.PdfPageSize = pdfPageSize;
converter.Options.PdfPageOrientation = pdfOrientation;
converter.Options.WebPageWidth = arguments.WebPageWidth;
converter.Options.WebPageHeight = arguments.WebPageHeight;
converter.Options.MinPageLoadTime = arguments.MinPageLoadTime; //<<< In my testing...I temporarily set this to 15 (for seconds)
PdfDocument doc = converter.ConvertUrl(arguments.Url);
var bytes = doc.Save();
return bytes;
}