iPadOS 27: strokes saved via QLPreviewController markup can't be erased after reopening (worked on iPadOS 26)

Since iPadOS 27, Apple Pencil strokes that were drawn and saved through the system markup UI in QLPreviewController can no longer be erased with the pixel eraser once the PDF is saved and reopened. They can only be selected and deleted as whole annotations. On iPadOS 26 the same flow kept saved strokes erasable.

Reproduction (no custom code needed — Files app shows it too):

  1. Files app → long-press a PDF → Quick Look → Markup
  2. Draw a few strokes with Apple Pencil, tap Done/save
  3. Reopen the same PDF in Quick Look → Markup
  4. Eraser (Erase Strokes mode) does nothing on the saved strokes

The same happens in our app, which presents PDFs via QLPreviewController with editingModeFor = .createCopy. Newly drawn strokes in the current session erase fine; only saved-and-reloaded ones are affected. The new Preview app is NOT affected — the same PDF edited there stays fully re-editable.

Digging into the saved files: Quick Look writes each stroke as a /Stamp annotation whose /AAPL:AKExtras contains only legacy AnnotationKit data (AKAnnotationObject with a flattened AKImageAnnotation, or AKAnnotationV2/AKInkAnnotation2) — and no /PPK entry. The Preview app embeds the PencilKit drawing data (/PPKType = "draw", /PPK with a "crdt" stream, plus page-level /AAPL:PPK + /AAPL:PPKHash), which is what makes its output re-editable. It looks like the iPadOS 27 markup editor only restores erasable strokes from /PPK, while the Quick Look save path still writes the old format — so Quick Look can no longer round-trip its own output.

Questions:

  1. Is this an intentional behavior change or a regression? I couldn't find anything in the iPadOS 27 release notes about Quick Look / markup persistence.
  2. Is there any way for a host app to opt QLPreviewController's markup into the new PencilKit-based persistence?
Answered by DTS Engineer in 912172022

Thanks for the detailed report, and especially for the comparison of what Quick Look and Preview write. That comparison made it quick to check the files here.

I wasn't able to reproduce the erasing failure. I used a small app that presents a PDF in QLPreviewController with .createCopy, and also the Files app. I drew strokes, saved, reopened, and erased parts of the saved strokes with the pixel eraser. It worked every time, on these devices:

  • iPad Pro 11-inch (4th generation) with an iPadOS 27.0 beta build, drawing with a finger, in the app and in Files
  • iPhone 18 Pro Max with iOS 27.0, drawing with a finger
  • iPad Pro 13-inch (M4) with iPadOS 26.7, drawing with Apple Pencil Pro

Your observation about the files matches mine. In iPadOS 26.7, the saved stamp annotation's /AAPL:AKExtras dictionary included PPK and PPKType. In iOS 27.0 and iPadOS 27.0 it didn't. Even so, the saved strokes stayed erasable in 27.0 in my tests. I can't say whether that change in the saved format is intentional. One case I couldn't cover is drawing with Apple Pencil in iPadOS 27, because my Pencil doesn't pair with the iPad I have running 27.

On your second question, QLPreviewController doesn't offer a choice of annotation format. The delegate's previewController(_:editingModeFor:) selects only whether editing is off, whether edits update the file, or whether they go to a copy. If your app needs control over how strokes are stored, look at PDFPageOverlayViewProvider in PDFKit. It lets you place a PencilKit canvas over each page and save the drawing yourself. What's new in PDFKit shows how to set that up.

Please consider filing a bug report about this so our engineering teams can investigate this issue. A resolution may involve changes to Apple's software. Include your exact iPadOS build, and a PDF before and after markup from the Files app steps. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Thanks for the detailed report, and especially for the comparison of what Quick Look and Preview write. That comparison made it quick to check the files here.

I wasn't able to reproduce the erasing failure. I used a small app that presents a PDF in QLPreviewController with .createCopy, and also the Files app. I drew strokes, saved, reopened, and erased parts of the saved strokes with the pixel eraser. It worked every time, on these devices:

  • iPad Pro 11-inch (4th generation) with an iPadOS 27.0 beta build, drawing with a finger, in the app and in Files
  • iPhone 18 Pro Max with iOS 27.0, drawing with a finger
  • iPad Pro 13-inch (M4) with iPadOS 26.7, drawing with Apple Pencil Pro

Your observation about the files matches mine. In iPadOS 26.7, the saved stamp annotation's /AAPL:AKExtras dictionary included PPK and PPKType. In iOS 27.0 and iPadOS 27.0 it didn't. Even so, the saved strokes stayed erasable in 27.0 in my tests. I can't say whether that change in the saved format is intentional. One case I couldn't cover is drawing with Apple Pencil in iPadOS 27, because my Pencil doesn't pair with the iPad I have running 27.

On your second question, QLPreviewController doesn't offer a choice of annotation format. The delegate's previewController(_:editingModeFor:) selects only whether editing is off, whether edits update the file, or whether they go to a copy. If your app needs control over how strokes are stored, look at PDFPageOverlayViewProvider in PDFKit. It lets you place a PencilKit canvas over each page and save the drawing yourself. What's new in PDFKit shows how to set that up.

Please consider filing a bug report about this so our engineering teams can investigate this issue. A resolution may involve changes to Apple's software. Include your exact iPadOS build, and a PDF before and after markup from the Files app steps. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.