Pdf Color Transparent doesn't work

Hi,
I have a problem with this simple line of code:
page.Graphics.DrawLine(PdfPens.Transparent, new PointF(0, 100), new PointF(100, 200));

Where page is a PdfPage obviously.

The problem is that the line is drawn BLACK instead of TRASPARENT.

I also tried to use an instance of PdfPen with the parameter Color.Transparent in the constructor but I have the same mistake...

Thank you in advance.


1 Reply

SL Sowmiya Loganathan Syncfusion Team February 28, 2020 09:39 AM UTC

Hi External,    
  
Thank you for contacting Syncfusion support.    
  
We have analyzed your query. The “Transparent” in Pdfpens or PdfPen does not have any color. By default, it will take the color which has been used before. For example, if you are drawing the text using red color, then the line (after drawing of text) with a transparent color drawn with red color only. So this is the behavior of Adobe Reader.    
  
Please let us know if you have any concerns about this.   
   
Regards, 
Sowmiya Loganathan 


Loader.
Up arrow icon