0

i got show the pdf with next lines

webView.load(decodeData, mimeType: "application/pdf", characterEncodingName: "utf-8", baseURL: URL(fileURLWithPath: ""))

however i cant find the way to download it, how can i download it using a button the next lines are a little part

if let form = eDocument{
            self.title = "Follow"
            if let decodeData = Data(base64Encoded: form.content, options: .ignoreUnknownCharacters) {
               let str = String(decoding: decodeData, as: UTF8.self)
                webView.load(decodeData, mimeType: "application/pdf", characterEncodingName: "utf-8", baseURL: URL(fileURLWithPath: ""))
            }
        }

thanks

  • Possible duplicate of [Saving PDF Files with Swift in iOS and display them](https://stackoverflow.com/questions/29479812/saving-pdf-files-with-swift-in-ios-and-display-them) – Nathan Jul 19 '19 at 16:39
  • @Nathan the problem is, i dont have any URL, the info comes from WS – Edgar Uribe Jul 19 '19 at 16:44

0 Answers0