0

I am creating an simple app which load pdf file from a particular website into UIWEBVIEW and i want to save it into iBook. I was finding many tutorial but doesn't make sense.I want to know how i am able to save pdf file which i have loaded in UIWEBVIEW and save it to iBook. Thank you.

let urlPDF = NSURL(string: "https://www.tutorialspoint.com/swift/swift_tutorial.pdf")

Here is code that i loaded it to uiwebview.

let request = NSURLRequest(url: urlPDF! as URL)
webView.loadRequest(request as URLRequest)
nishee
  • 141
  • 7
Visal Sambo
  • 1,270
  • 1
  • 19
  • 33
  • 1
    First you need to save your file from the web and then you can use this answer to work with iBook https://stackoverflow.com/questions/27959023/swift-how-to-open-local-pdf-from-my-app-to-ibooks/29831628 – Victor Sigler May 10 '18 at 04:25
  • @VictorSigler thank you sir. it works fine now. – Visal Sambo May 15 '18 at 10:26

0 Answers0