We need to change font color of whole PDF document especially any mailto: blue color.
When i tried following code , it works but some document change to full black.
Using document As Document = New Document(filepath)
Dim strategy As Aspose.Pdf.RgbToDeviceGrayConversionStrategy = New Aspose.Pdf.RgbToDeviceGrayConversionStrategy()
For idxPage As Integer = 1 To document.Pages.Count
' Get instance of particular page inside PDF
Dim page As Page = document.Pages(idxPage)
' Convert the RGB colorspace image to GrayScale colorspace
' page.MakeGrayscale()
strategy.Convert(page)
Next
'Save resultant file
document.Save(filepath)
End Using
When i tried following code to change only font color, hyperlink blue color does not change
Using pdfDocument As Aspose.Pdf.Document = New Aspose.Pdf.Document(filepath)
For idxPage As Integer = 1 To pdfDocument.Pages.Count
Next
Dim ta As Aspose.Pdf.Text.TextFragmentAbsorber = New Aspose.Pdf.Text.TextFragmentAbsorber()
For Each tf As Aspose.Pdf.Text.TextFragment In ta.TextFragments
tf.TextState.ForegroundColor = Aspose.Pdf.Color.Black
Next
pdfDocument.Save(filepath)
End Using
WE NEED IMMEDIATE HELP, SO Please help US