Redaction - DrawFilledRectangle vs BurnAnnotationsToPage
Posted: Mon Oct 18, 2021 8:22 pm
I have a .Net windows forms app that needs to redact TIFF images. I noticed the PDF library has specific redaction methods but nothing in the GDViewer/GdPictureImaging stack.
I don't have a need to move/edit redactions and burn them with a separate button like the sample code does. I basically I need to draw a rectangle and have it burn immediately upon completion. The user needs to redact multiple times, so there could be multiple burns. I see two approaches:
1) Put the viewer MouseMode in MouseModeAreaSelection to create the rectangle selection and on the mouse-up event call DrawFilledRectangle to add the block. When this completes, we need to reload the viewer.
2) Put the viewer in redaction mode by calling AddRectangleAnnotInteractiveand on the AnnotationAddedByUser event call the BurnAnnotationsToPage method. Then re-add the redaction by re-calling AddRectangleAnnotInteractiveand. I did notice that if I interact with the GD Viewer (changing pages, etc.) it will turn off the interactive rectangle.
Two questions:
1) Do both offer the same security of redaction ? IE not possible to remove the redacted blocks to view text.
2) Is there any performance advantages of one approach over the other ?
I don't have a need to move/edit redactions and burn them with a separate button like the sample code does. I basically I need to draw a rectangle and have it burn immediately upon completion. The user needs to redact multiple times, so there could be multiple burns. I see two approaches:
1) Put the viewer MouseMode in MouseModeAreaSelection to create the rectangle selection and on the mouse-up event call DrawFilledRectangle to add the block. When this completes, we need to reload the viewer.
2) Put the viewer in redaction mode by calling AddRectangleAnnotInteractiveand on the AnnotationAddedByUser event call the BurnAnnotationsToPage method. Then re-add the redaction by re-calling AddRectangleAnnotInteractiveand. I did notice that if I interact with the GD Viewer (changing pages, etc.) it will turn off the interactive rectangle.
Two questions:
1) Do both offer the same security of redaction ? IE not possible to remove the redacted blocks to view text.
2) Is there any performance advantages of one approach over the other ?