• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I want to apply redaction through coding with overlay red color text

New Here ,
Apr 27, 2017 Apr 27, 2017

Copy link to clipboard

Copied

            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.

TOPICS
Acrobat SDK and JavaScript

Views

873

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 27, 2017 Apr 27, 2017

Copy link to clipboard

Copied

If the documentation is correct, I don't see how this line could even compile:

                                    RParams->colorVal = &Red;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Thanks for the reply.  I have corrected the code by passing 0 as RParams->colorVal = 0.

I want to implement plugin redaction with overlay text exactly how acrobat does. I have implemented above code for redaction and applying mask by adding PDEPath for the coordinates. It shows exactly how acrobat does redaction.

But I after adding overlay text for the redaction, if we mouse move on redaction, it disappears mask ( PDEPath) and shows overlay text. But I want PDEPath and text how acrobat shows.

Please help me to resolve the issue.

Thanks,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

I don't see how RParams->colorVal = 0 can compile either. colorVal is a structure, not an integer or pointer. Why don't you fill it in as red?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Thanks for the reply. ok. I will fill it as red. But what about overlay text. I want PDEPath and text how acrobat shows after redaction. Please help me to solve the issue.

Thanks,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2017 May 03, 2017

Copy link to clipboard

Copied

please fill in the colour correctly and tell us what you now see on the page at the redaction point when it is applied.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 03, 2017 May 03, 2017

Copy link to clipboard

Copied

Thanks for the reply. After filling the color and apply redaction, it shows PDEPath ( mask) what i have applied. On mouse of that coordinates, it shows overlay text and disappears PDEPath ( mask what i have applied after redaction). But i want that mask along with text how acrobat does redaction using properties.

Thank  you,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2017 May 03, 2017

Copy link to clipboard

Copied

Sorry, outbid my experience now. But you now seem to have valid code. It may be worth buying a support case.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 10, 2017 May 10, 2017

Copy link to clipboard

Copied

Hello,

    I am able to redact selected text using PDDocApplyRedactions and adding PDEPath ( mask). But how to add the text for the mask.

Should I add PDEForm  and text to implement redaction with overlay text. ( how Acrobat does ).

Please help me to solve the issue.

Thanks,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 13, 2017 May 13, 2017

Copy link to clipboard

Copied

It would appear that although the documentation IMPLIES that you can just set a color and/or text and the SDK will do all the work for you – this was never actually implemented. You need to instead create the Form XObject yourself and add that to the redaction params – and it will be placed into the annotation location (or just that yourself after redaction).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 14, 2017 May 14, 2017

Copy link to clipboard

Copied

Thanks for the reply.

I will try to add FormXObject and add that to the redaction params.

Thanks,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2017 May 10, 2017

Copy link to clipboard

Copied

It may be worth buying a support case, as I said.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

If you can create the redaction markups using JavaScript it's very easy to do that... You just use the addAnnot method to create the Redaction annotation, set the overlayText property to the text you want to appear and the textColor property to the color you want it to have. There's an example of this under the documentation of the overlayText property in the Acrobat JS Reference API.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 26, 2017 May 26, 2017

Copy link to clipboard

Copied

LATEST

Thank you for the response. I added overlay text using PDETextAdd method.

Thanks,

Sowbhagya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines