Reputation: 7060
I need to embed Multiple Page PDF File with Email in my iOS App.
I can create Single PDF Page with this this tutorial.
With above tutorials, I can only create single PDF Page.
I don't know how to create multiple Page?
Upvotes: 0
Views: 367
Reputation: 4214
As rmaddy says, uiGraphicsBeginPage
will create a page break. You have to decide the size of your page and when to begin new.
Work your way down the page, checking y value every step and when you reach max, begin new. Your page can be as long and as wide as you wish. You have to determine those parameters and keep track as you progress through your document.
Upvotes: 1
Reputation: 318934
Creating multiple pages is the same as creating one page. For each page you call UIGraphicsBeginPDFPage()
then you draw the content. The linked tutorial shows you this already in the generatePdfWithFilePath:
method. You just need to change when the done
variable is set so more than one page is generated.
Upvotes: 1