Programmatically Generate PDF from HTML on iPhone

前端 未结 6 1393
挽巷
挽巷 2021-02-10 15:57

I am looking for a way to programmatically (in obj-c) generate a PDF file from a local html file. I am dynamically generating the html from user inputs, I need to create the PD

6条回答
  •  情话喂你
    2021-02-10 16:32

    To generate a pdf from an HTML, you need to render the html into a web view, and take snapshots of the web view, and render them into an image context. The tutorial might be helpful:

    http://www.ioslearner.com/convert-html-uiwebview-pdf-iphone-ipad/

提交回复
热议问题