We need a transparent fill for annotations

Hi.  I create a an ellipse annotation and then change the fill color.  I see that it blocks the information in the PDF below the annotation.  Now, I want to set the fill color back to transparent.  How do I do it?




3 Replies 1 reply marked as answer

VS Vasugi Sivajothi Syncfusion Team May 17, 2022 06:46 AM UTC

Hi Arthur,


You can set the transparent to the annotations using the opacity property by programmatically using the below code snippet or you can change the opacity using the opacity option in the toolbar.


Code Snippet:

 

<SfPdfViewerServer @ref="PdfViewer" DocumentPath="@DocumentPath"  CircleSettings="@CircleSettings" Height="100%" Width="100%">

</SfPdfViewerServer>

 

@code {

    public SfPdfViewerServer PdfViewer { get; set; }

    public string DocumentPath = "wwwroot/data/F# Succinctly.pdf";

    PdfViewerCircleSettings CircleSettings = new PdfViewerCircleSettings { FillColor = "orange", Opacity = 0.6 };

}

 


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/TestApp-980023774


Kindly try this and let us know if you have any concerns about this.


Regards,

Vasugi.


Marked as answer

AB Arthur Butler May 31, 2022 07:03 PM UTC

Yes, but this changes the opacity for both the stroke (border) and fill.  There seems to be no way to just make the fill color transparent.



VS Vasugi Sivajothi Syncfusion Team June 2, 2022 03:42 AM UTC

Hi Arthur,


Sorry for the inconvenience. Currently, there is no support to change the fill color alone to transparent. We suggest you change the stroke color separately using the below code snippet.


Code Snippet:

 

PdfViewerCircleSettings CircleSettings = new PdfViewerCircleSettings { FillColor = "orange", Opacity = 0.6, StrokeColor = "blue" };

 


Kindly try this and let us know if you have any concerns about this.


Regards,

Vasugi


Loader.
Up arrow icon