Save a screenshot as pdf or high resolution-image using Swift 5 xcode 13

Just convert your image to pdf via PDFKit

import PDFKit
let pdfPage = PDFPage(image: screenshotImage) 
let fm = FileManager.default urls = fm.urls(for: .documentDirectory, in: .userDomainMask).first! 
let savedPDF = urls!.appendingPathComponent("pdfPage.pdf") pdfPage?.document?.write(toFile: "pdfPage")

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top