How to redact a field in FlexiCapture with script?

Question

Can I replace sensitive information in output file with custom image?

Is it possible to blur sensitive information in exported PDF file?

Can I edit image in FlexiCapture?

Answer

To redact sensitive information in output image files (e. g. export results) it is possible to use script to replace the field where sensitive information is present with black bar or custom image.

To do it, refer to the field scripting object IField dedicated property "Regions" (scripting object of IFieldRegions type) and then each region property "Picture" (scripting object of IPictureObject type).

Example.

//C# script sample for document processing script stage
//Create editable copy of the page image where target field region is located
IEditablePictureObject eidtablePictureObject = Document.Field("Document Section Name\\TargetField").Regions[0].Page.Picture.CreateEditableCopy();

//Erase the image of the only region (index "0") of field "TargetField" 
eidtablePictureObject.Erase(Document.Field("Document Section Name\\TargetField").Regions[0].Rects[0].ToString());

//Replace page image with edited image
Document.Field("Document Section Name\\TargetField").Regions[0].Page.ReplaceImage(eidtablePictureObject);

Note. It is possible to replace image only of the whole page with such script, not separate field. So it is required to change all necessary field regions in editable page image copy, than replace page image.

Additional Information.

See in ABBYY Online Help:

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed