No Highlights color and Opacity

I have searched the text and found text.
if (resultCode == TextSearchResultCode.e_found)
{

                    hlts.Begin(PdfContent);
                    while (hlts.HasNext())
                    {
                        //Page cur_page = PdfContent.GetPage(hlts.GetCurrentPageNumber());
                        var p = hlts.GetCurrentPageNumber();
                        Page cur_page = PdfContent.GetPage(hlts.GetCurrentPageNumber());
                        double[] quads = hlts.GetCurrentQuads();
                        int quad_count = quads.Length / 8;
                        for (int i = 0; i < quad_count; ++i)
                        {
                            //assume each quad is an axis-aligned rectangle
                            int offset = 8 * i;
                            double x1 = Math.Min(Math.Min(Math.Min(quads[offset + 0], quads[offset + 2]), quads[offset + 4]), quads[offset + 6]);
                            double x2 = Math.Max(Math.Max(Math.Max(quads[offset + 0], quads[offset + 2]), quads[offset + 4]), quads[offset + 6]);
                            double y1 = Math.Min(Math.Min(Math.Min(quads[offset + 1], quads[offset + 3]), quads[offset + 5]), quads[offset + 7]);
                            double y2 = Math.Max(Math.Max(Math.Max(quads[offset + 1], quads[offset + 3]), quads[offset + 5]), quads[offset + 7]);

                            Highlight hl = Highlight.Create(PdfContent.GetSDFDoc(), new Rect(x1, y1, x2, y2));
                            hl.SetColor(new ColorPt(0, 1, 0));
                            hl.RefreshAppearance();
                            cur_page.AnnotPushBack(hl);
                        }
                        hlts.Next();
                    }

I checked the location and page number. All correct but no Highlight color. Here my color pure green. How can we place opacity?

Hello,

Thank you for contacting us about this. To confirm, are you not seeing any highlights in the resulting document, or are you just wanting to change the opacity? You can set opacity by calling the SetOpacity() method on the highlight annotation.

In addition, to get a better understanding of the issue, could you please provide us with the input and output file, along with the SDK version and the full code used to reproduce the issue?

Thank you.

I am new to this application. I In Reference I only find PDFTron.UWP. I am not sure about SDK version. Right now I am not concerned about opacity. I checked the quads and they are correct and in document I have conformed the text location. The file is encrypted and use decrypt var result = await Protection.Decrypt(“LOCAL = user”, destinationFile); File name (LDG2-S-V-BV-EN.PDF) and get it from File
hl.SetColor(new ColorPt(0, 1, 0), 3); and hl.SetColor(new ColorPt(0, 1, 0)); I tried both, no effect
Regards Agha

I don’t understand input and output file. I tried many files and it looks like we are using code not any SDK. Kindly look the image for references. Reference
Any help will be very much appreciated.
Regards
Agha Khan

Hello Agha,

Thank you for your response and apologies for the delay. The code you have provided seems correct.

In addition, I see you have already submitted a ticket to support (support@pdftron.com), so we can continue the conversation there.