Open bigtunacan opened 11 years ago
Could you provide the HTML source code so that I can reproduce this please ?
Unfortunately we ended up working around this issue in our app by just eliminating some of our multi-page reports in our final released app. If I run up against this again I'll send you a sample.
Anyone has a solution for this?
@lopes710 did you experience this issue as well? Do you have a test file?
Yes. i dont have a test file sorry.
I solved it by applying the same color in the context background with the page background color I was drawing.
In the printToPDF method:
....
for ( int i = 0 ; i < self.numberOfPages ; i++ )
{
UIGraphicsBeginPDFPage();
//added this
CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(currentContext, [UIColor
colorWithHexString:@"494949"].CGColor); // set context background color
CGContextFillRect(currentContext, bounds);
[self drawPageAtIndex: i inRect: bounds];
}
....
On Tue, Jan 21, 2014 at 2:52 PM, Clément Wehrung notifications@github.comwrote:
@lopes710 https://github.com/lopes710 did you experience this issue as well? Do you have a test file?
— Reply to this email directly or view it on GitHubhttps://github.com/iclems/iOS-htmltopdf/issues/2#issuecomment-32886274 .
I have same issue, someone also reported same issue: http://stackoverflow.com/questions/14775292/html-to-pdf-pages-bottom-margin-grows-larger-with-every-page?rq=1
anyone has a solution?
I generated a PDF that was about 5 pages long and each page had a larger and larger area at the bottom of the page where it is just white area.