-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Page Generated #326
Comments
What I’m trying to figure out is how much info can fit on a page. Is there a way to know this info? |
The Therefore my approach would be adding a https://github.com/techprimate/TPPDF/blob/main/Source/Internal/Layout/PDFPageBreakObject.swift#L73 Untested example what it could look like: override internal func draw(generator: PDFGenerator, container: PDFContainer, in context: PDFContext) throws {
if !stayOnSamePage {
generator.delegate?.generatorWillEndPage()
PDFContextGraphics.gendPDFPage(in: context)
generator.delegate?.generatorDidEndPage()
generator.delegate?.generatorWillBeginPage()
PDFContextGraphics.beginPDFPage(in: context, for: generator.document.layout.bounds)
generator.delegate?.generatorDidBeginPage()
// if there is a background color set, fill the page with it
if let color = generator.document.background.color {
PDFGraphics.drawRect(in: context, rect: generator.document.layout.bounds, outline: .none, fill: color)
}
generator.drawDebugPageOverlay(in: context)
}
applyAttributes(in: context)
} Pull-requests are welcome! |
I'm using this library in my project. Is there a way of being informed when a new page is generated without calling createNewPage(). I would like to be able to let the library generate the PDF and every time a section changes I can update it and if a new page is generated place the name of the section at the top adding "continued" much like bank statement do.
Thanks
Taz
The text was updated successfully, but these errors were encountered: