Resolved: ‘PdfTextExtractor’ does not contain definition for ‘GetTextFromPage’

In this post, we will see how to resolve ‘PdfTextExtractor’ does not contain definition for ‘GetTextFromPage’


‘PdfTextExtractor’ does not contain definition for ‘GetTextFromPage’, it throws Compiler Error CS0117
This is my code, which I have coppied just to check how does iText7 work:
I tried using iTextCsharp, but there was writen that iText7 is a new version.
I am working on “Console Application”, maybe this is the problem? Should I use another framework?

Best Answer:

The problem is that your class is also called PdfTextExtractor. Please rename your static class and the issue will be solved.
For future issues, you can jump to the reference (via F12 or similar, depending on your IDE/Shorctus) and check where it directs you.

If you have better answer, please add a comment about this, thank you!