Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Generally, to convert WebForm to PDF document uses additional tools. This sample shows how to use Aspose.PDF library to render WebForm to PDF. The Aspose Export GridView To Pdf Control is also included in this sample to show how to render GridView control to PDF document.
The original idea for render WebForm to PDF is to create helper class, which inherited from System.Web.UI.Page, and overriding a Render method.
void Render(HtmlTextWriter writer)
{
if (RenderToPDF)
{
// render web page for PDF document
}
else
{
// render web page in browser
base.Render(writer);
}
}
There are two Aspose tools can be used for render HTML to PDF:
In this sample we have 2 demo reports.
Helpers\PdfPage.cs
- contains a helper class, which shows how to use Aspose.PDF API.
The Aspose.Pdf.GridViewExport project contains extened GridView control for demonstration in Report2.aspx
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.