ページを PDF に変換するコントロールを作成しようとしています。
protected void ConvertPageToPDF_click(object sender, EventArgs e)
{
string pageHtml;
byte[] pdfBytes;
string url = HttpContext.Current.Request.Url.AbsoluteUri;
// get the HTML for the entire page into pageHtml
HtmlTextWriter hw = new HtmlTextWriter(new StringWriter());
this.Page.RenderControl(hw);
pageHtml = hw.InnerWriter.ToString();
// send pageHtml to a library for conversion
// send the PDF to the user
}
これは部分的に機能します。私のページにはいくつかのリピーターがいます。それらのコンテンツは に表示されませんpageHtml
。その理由について何か考えはありますか?これを修正するにはどうすればよいですか?