We’re hooking up another system to our Aspose pipeline for document processing, and that other system spits out PDF’s with redacted content. This in itself works fine; the content is removed and a black bar is added to indicate where the content used to be. However, when using Aspose.Pdf.Devices.JpegDevice to render JPGs of the pages in that document, the black bar is removed. JpegDevice doesn’t seem to honor the settings of redacted content; no matter what you style it as it will show as white in the jpg.
For clarity the document looks as expected when shown in Adobe acrobat for example. I’ve attached a sample file here: aspose_redaction.pdf (297.4 KB).
Opening this file in your browser or adobe will show the black bar in the first paragraph. But getting an image like this will not render the black bar:
using var document = new Document(pagePdfStream); var jpegDevice = new JpegDevice(new Resolution(150), 90); jpegDevice.Process(document.Pages[page], imageStream);
Any thoughts? Thank you.