I want to apply redaction through coding with overlay red color text
I want to apply redaction through coding with overlay red color text. My code has shown below
PDRedactParams RParams;
RParams = (struct _t_PDRedactParams *)malloc(sizeof(PDRedactParamsRec));
RParams->size = sizeof(PDRedactParamsRec);
RParams->pageNum = iIndexPage;
RParams->redactQuads = &quad;
RParams->numQuads = 1;
PDColorValueRec Red;
Red.space = PDDeviceRGB;
Red.value[0] = ASInt32ToFixed(1);
Red.value[1] = ASInt32ToFixed(0);
Red.value[2] = 0;
RParams->colorVal = &Red;
const char *docTitleValue = "Title";
ASText text = ASTextNew();
ASTextSetEncoded(text, docTitleValue,
(ASHostEncoding)PDGetHostEncoding());
RParams->overlayText = text;
RParams->horizAlign = kPDHorizLeft ;
PDAnnot redactAnnot = PDDocCreateRedaction(pdDoc, RParams);
PDApplyRedactionParams applyparam;
applyparam = (struct _t_PDApplyRedactionParams*)malloc(sizeof(_t_PDApplyRedactionParams));
applyparam->size = sizeof(_t_PDApplyRedactionParams);
applyparam->redactionAnnots= &redactAnnot;
applyparam->redactionCount = 1;
applyparam->keepMarks = true;
applyparam->statusProcs = NULL;
applyparam->progressText = NULL;
applyparam->progressDuration = NULL;
PDDocApplyRedactions(pdDoc, applyparam);
It is applying redaction without overlay text. Please someone help me to solve the issue.
