- Code: Select all
Sp.PdfDocument pdfDoc = new Sp.PdfDocument(inputFilePath);
foreach (Sp.PdfPageBase page in pdfDoc.Pages)
{
page.Canvas.DrawString("some text", new Sp.Graphics.PdfFont(Sp.Graphics.PdfFontFamily.Courier, 18f), Sp.Graphics.PdfBrushes.Transparent, 10, 10);
}
pdfDoc.SaveToFile(filePath)
results in the string being drawn in the color black. Is there something else that needs to be done in order for the string to be drawn transparent? My aim was to have invisible text that can still be highlighted.