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

Free Support Forum - aspose.com

Extracting JPG from PDF with redacted content doesn't show redactions properly

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.


1 Like


A ticket with ID PDFNET-50683 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.