|
Rank: Member Groups: Member
Joined: 12/14/2012 Posts: 16
|
I have use the ASPX GridView to show the data, there are 44 Row, when I use the ASPXTOHtml Control, row 42-44 cannot go to next page. Is it any step I have missing? many thanks!! Quote: EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(11f, 8.5f); EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.5f, 11f, 8.5f); ASPXToPDF1.RenderAsPDF("REPORT");
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, Check your page break settings. If you have set somewhere to avoid page break, then you will get that problem. See here for more information: http://www.essentialobjects.com/doc/4/htmltopdf/paging.aspxThanks
|
|
Rank: Member Groups: Member
Joined: 12/14/2012 Posts: 16
|
Thanks, for you reply, I have tried to use <thread>, and the header can show on each page break, many thanks!! Nevertheless, the another problem has shown: Case 1. The GridView can show all the data, but the page header is overlap the GridView header. (padding =0.0f) Quote: EO.Pdf.HtmlToPdf.Options.HeaderHtmlFormat = "<div style=\"padding: 20px;\"><table width=\"100%\"><tr><td><table><tr><td width=\"15%\">" + this.txtStartDate.Text + "</td><td width=\"15%\">" + this.DDLSite.SelectedItem.Text.Trim() + "</td><td width=\"70%\" align=\"right\">Page {page_number}</td></table></td></tr></table></div>"; EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(11f, 8.5f); EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.0f, 11f, 8.5f);
Case 2. The Row 40-41 is missing (padding =0.5f) Quote: EO.Pdf.HtmlToPdf.Options.HeaderHtmlFormat = "<div style=\"padding: 20px;\"><table width=\"100%\"><tr><td><table><tr><td width=\"15%\">" + this.txtStartDate.Text + "</td><td width=\"15%\">" + this.DDLSite.SelectedItem.Text.Trim() + "</td><td width=\"70%\" align=\"right\">Page {page_number}</td></table></td></tr></table></div>"; EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(11f, 8.5f); EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.5f, 11f, 8.5f);
In Case 2, It seems that the row is shift 0.5 to the bottom.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Your HtmlToPdf.Options.OutputArea in both case is wrong.
Thanks
|
|
Rank: Member Groups: Member
Joined: 12/14/2012 Posts: 16
|
oh, thanks for your reply, I want to print in A4 size in landscape, what it the coding in it, many thanks!!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Please read the documentation, try different values and see what happens. You are responsible to debug these kind of issues yourself.
|
|