Images Could Not Be Redacted Warning in IronPDF

Curtis Chau
Curtis Chau
Updated: November 5, 2026

IronPDF 2026.11.1+ introduces pixel-level image redaction: region redaction sets the image pixels under the region to black, including images with masks or alternates and images inside forms, as the redaction guide describes. An image that cannot be redacted safely keeps its original image data, is counted, and is logged with this warning:

Warning! 1 image(s) on page 0 could not be redacted and still contain the original image data
Text

If you pass ThrowOnUnredactedImages: true, the call also throws an IronPdfProductException, and the warning is still logged:

1 image(s) on page(s) 0 could not be redacted and still contain the original image data
Text

Page numbers in both messages start at 0.

Logging: the default LoggingMode logs nothing, and a custom ILogger receives the message at Information, not Warning

Why Does Redacting a Signed PDF Report This?

PdfDocument.FromFile defaults to ChangeTrackingModes.AutoChangeTracking, which turns change tracking on when the PDF already has a signature. With change tracking enabled, every save is incremental and the earlier revision keeps the original image data, so any image you redact counts as not safely redacted.

Fix: open the PDF with ChangeTrackingModes.DisableChangeTracking before redacting. The existing signature no longer validates after that save, so sign the redacted file again if it needs a signature.

// Open without change tracking
PdfDocument pdf = PdfDocument.FromFile("signed.pdf", TrackChanges: ChangeTrackingModes.DisableChangeTracking);
pdf.RedactRegionOnPage(0, new RectangleF(50, 600, 200, 40), ThrowOnUnredactedImages: true);
pdf.SaveAs("redacted.pdf");
C#

Which Images Can Region Redaction Not Rewrite?

Region redaction leaves these images unchanged and reports them:

  • Images placed with a shear
  • Stencil masks (/ImageMask) drawn as the image itself
  • Inline images
  • Images with a color-key mask
  • Images whose mask stream, or whose containing form stream, another placement also draws
  • Images with an alternate that is shared with another object or has its own mask
  • Images whose soft mask has /Matte, or a /Decode other than [0 1] and [1 0]
  • Images in forms nested deeper than 16 levels
  • Image formats that cannot be decoded

Fix: set ThrowOnUnredactedImages to true and save only when the call returns, as the redaction guide's sample does, so no file with the original image data is written. The parameter exists on RedactRegionOnPage, RedactRegionsOnPage, RedactRegionOnPages and RedactRegionsOnAllPages; the multi-page methods redact every page before they throw.

Why Does Every Redaction Fail with an Older Engine?

The IronPdfEngine (Docker) version must match the IronPDF version. An older engine cannot redact image data: it still draws the black box but keeps the image pixels, and it logs this warning once per process:

Warning! The connected IronPdfEngine is too old to redact image data, so images in redacted regions may still contain the original image data. Update IronPdfEngine to match this IronPdf version.
Text

With ThrowOnUnredactedImages: true, every page is redacted first, then the call throws because the result cannot be verified:

The connected IronPdfEngine is too old to redact image data, so any image in the redacted region(s) may still contain the original image data
Text

An engine from before May 2024 fails with a gRPC Unimplemented error instead.

Fix: run the IronPdfEngine version that matches the IronPDF package version.

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

Read More

Ready to Get Started?

NuGet Downloads 22,198,312Version:2026.11just released