Enable Live Text on PDFKit

Hi!

I watched WWDC2022's 10089 session "What's New in PDFKit?" where it's said that Live Text is now compatible with PDFKit.

However, I can't seem to find anything related to it in documentation or code.

ImageAnalyzer needs an UIImage to work. But that would mean retrieve the current PDFPage and then convert it to UIImage which is a performance hog.

How can I enable Live Text in PDFKit? thanks.

Hello,

The Live Text functionality in PDFKit is automatically enabled. You can see the difference yourself by following these steps:

  1. Take a photo of a physical document.
  2. Convert it to PDF using Preview.
  3. In a small app, create a PDFDocument of the PDF, set that as the document of a PDFView
  4. Run the app on an iOS 16 device, highlight and select some text within the document.
  5. Run the app on a pre-iOS 16 device, notice that you are unable to highlight and select the text.
Enable Live Text on PDFKit
 
 
Q