SimplePDF
SimplePDF copied to clipboard
How to begin new page automatically
Hi there,
how can we determine page height according to content, basically i have define pagesize but unable to begin new page as data is overlapping in single page
can you help me out how can start new page automatically
Hey, I tried it.
pdf = SimplePDF.init(pageSize: CGSize.init(width: 595, height: 841), pageMarginLeft: 100, pageMarginTop: 180, pageMarginBottom: 20, pageMarginRight: 100)
For every loop in your data just add pdf.beginNewPage()
at the beginning.
It'll create a new page for new content and if any content is long, it'll extend content to the new page automatically.
what do
Hey, I tried it.
pdf = SimplePDF.init(pageSize: CGSize.init(width: 595, height: 841), pageMarginLeft: 100, pageMarginTop: 180, pageMarginBottom: 20, pageMarginRight: 100)
For every loop in your data just add
pdf.beginNewPage()
at the beginning. It'll create a new page for new content and if any content is long, it'll extend content to the new page automatically.
What do you mean "for every loop in your data"? Can you be more precise?