We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Redacting rotated images can "miss" some of the image


I have been trying to redact rotated images on pdfs using Aspose.PDF and noticed sometimes some of the image gets missed–the redaction will stop at ~80% of the way through the image. Interestingly this seems to happen inconsistently based on save of the file through a pdf creation tool–after I added another image to the sample doc the rotated image redacted fine, but upon just recreating it, parts of the image were missed in the redaction process.

The same behaviour was present when using facades to redact.

Repro code:

var filePath = @"RotatedImage.pdf";
using (var document = new Document(filePath))
	var page = document.Pages[1];
	var annotation =
		new RedactionAnnotation(page, new Rectangle(0, 0, page.CropBox.Width, page.CropBox.Height));


	using (var outputImage = new FileStream(@"RedactedImage.png", FileMode.Create))
		page.Resources.Images[1].Save(outputImage, ImageFormat.Png);

Files used:
RotatedImageRedaction.zip (28.4 KB)



We have been able to reproduce the issue in our environment while testing the scenario with Aspose.PDF for .NET 20.2 and logged it as PDFNET-47779 in our issue tracking system for the sake of further investigation. We will look into details of it and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.