Welcome Guest Search | Active Topics | Sign In | Register

ASPXToPDF And ASPX GridView Options
keithlsp
Posted: Saturday, February 9, 2013 12:30:09 PM
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");


eo_support
Posted: Saturday, February 9, 2013 1:21:42 PM
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.aspx

Thanks
keithlsp
Posted: Sunday, February 10, 2013 3:45:42 AM
Rank: Member
Groups: Member

Joined: 12/14/2012
Posts: 16
eo_support wrote:
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.aspx

Thanks


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.
eo_support
Posted: Sunday, February 10, 2013 10:30:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Your HtmlToPdf.Options.OutputArea in both case is wrong.

Thanks
keithlsp
Posted: Sunday, February 10, 2013 11:46:30 AM
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!!
eo_support
Posted: Sunday, February 10, 2013 11:07:33 PM
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.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.