In order to override a method you need to create your own class that inherits from
PDFTextStripper
provided it is not
sealed
.
Also the method you want to override has to be marked virtual.
public class MyPDFTextStripper : PDFTextStripper
{
protected override void writeString(String text, List textPositions)
{
}
protected new void writeString(String text, List textPositions)
{
}
}
See
Knowing When to Use Override and New Keywords[
^]
Here is an article that might be helpful
Working with PDF files in C# using PdfBox and IKVM[
^]