Rafay
Rafay

Reputation: 99

how to generate a pdf file of a table view in iOS

I got a grouped table and i want to make a pdf file containing all the data of the table just like as it is in the table. Any suggestion how can i achieve this? Any kind of help would be really appreciated..

Upvotes: 0

Views: 726

Answers (1)

Paresh Navadiya
Paresh Navadiya

Reputation: 38259

Need to use UITableView's scrollView property to create render scrollView and convert to PDF.

Check ScrollViewToPDF example

It uses same scrollview's layer renderInContext but here PDF is created according to your requirement such as one page PDF or multiple page PDF

Note : It captures all visible as well as invisible part of scrollView

Upvotes: 1

Related Questions