|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
I set a report that uses EO PDF to HTML. For the comments area on the bottom, I put it inside a <div style="page-break-inside: avoid">. Still, the comments are split to two pages - the break happens right in the middle of the comments...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please try to update to the latest version first. We have recently fixed a few issues about manual paging. So it might have already been fixed.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
I did try that already.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
In that case please try to isolate the problem into a test project and send it to us. We will debug it here and see what we can find.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
The html page I am trying to convert can be seen here: http://educatorsa3.web703.discountasp.net/protected/Report.aspx?id=20677If you look at the source code, you will see that the Comments area is wrapped inside a <div style="page-break-inside: avoid">. Here is what happens when it is converted to PDF: http://educatorsa3.web703.discountasp.net/protected/ReportPDF.aspx?id=20677Here's the entirety of the code used for the conversion: protected void Page_Load(object sender, EventArgs e) { string strReportPageName = "Report"; if (Request["rpn"] != null) strReportPageName = Request["rpn"].ToString(); if (Request["id"] != null) { PdfDocument doc = new PdfDocument(); string strURL = "http://" + HttpContext.Current.Request.Url.Host + "/protected/" + strReportPageName + ".aspx?id=" + Request["id"].ToString(); HtmlToPdf.ConvertUrl(strURL, doc); HttpResponse response = HttpContext.Current.Response; response.Clear(); response.ClearHeaders(); response.ContentType = "application/pdf"; doc.Save(response.OutputStream); Response.End(); } }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted build .46 that should fix this problem. Please download the new build from the download page.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
Thanks. It's closer, but it still breaks between the word "Comments" and the actual comments, even though I have the header and actual comments wrapped inside a <div style="page-break-inside: avoid">.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We verified your test page with our online demo and it worked fine: http://www.essentialobjects.com/Products/EOPdf/UrlToPdf.aspx Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
It does the exact same thing when you verify the test page I provided with your online demo. There should be no page break between the word "Comments" and the comments themselves. Again, here is my test page: http://educatorsa3.web703.discountasp.net/protected/Report.aspx?id=20677Using either your online demo or my own script, it does the same thing. I am not making it up.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
I see what you meant. That's a problem. We will look into it and get back to you as soon as possible.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
Cool. Thanks. At least I'm not going crazy. I shall be patient. :)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We looked into the page and our HTML to PDF is correct. The reason is because both main_divComments and main_divComments2 are float, so their parent DIV actually has a size of (0, 0), which means even though logically the parent DIV contains those two child DIVs, visually they do not. This is the same idea as a parent DIV contains absolute positioned child DIVs. page-break rules are based on element's position and size, not their parent child relationship. Parent/child relationship is direct factor for the layout engine, but not a direct factor for paging.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2007 Posts: 133
|
Cool. I guess that makes sense, and indeed just using float on the parent div fixed the issue. Thanks!
|
|