Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let pdf = renderer.pdfData { (context) in
- let attributes = [ NSFontAttributeName : UIFont.boldSystemFont(ofSize: 15) ]
- // page 1
- context.beginPage()
- NSAttributedString(string: "Page 1", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
- // page 2
- context.beginPage()
- NSAttributedString(string: "Page 2", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
- // page 3
- context.beginPage()
- NSAttributedString(string: "Page 3", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
- // Now that I know that the PDF will have 3 pages, add the footer on all 3 pages - but how?
- }
- }
Add Comment
Please, Sign In to add comment