Skip to main content

Import Images from PDF

The SBSDKPDFPagesExtractor class provides methods that can be used to extract images from a PDF.

Exmaple of Importing Images from PDF

// The path where the pdf is stored.
guard let pdfURL = URL(string: "<path_to_pdf>") else { return }

// Creates an instance of `SBSDKPDFPagesExtractor`
let pageExtractor = SBSDKPDFPagesExtractor()

// Extracts pages from the pdf and returns an array of UIImage
let images = pageExtractor.images(from: pdfURL)

// You can also use `images(fromPDF:scaling)` method to extract images with a scaling applied
let scaledImages = pageExtractor.images(from: pdfURL, scaling: 2.0)

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?


On this page

Scroll to top