Hi @Sudesh_K
I was having the same issue. I believe there is a bug see:
In this BUG post, @opahopa prepared their own temporary fix. By creating their own LocalTxTFileKnowledgeSource Class.
My solution was to convert my .pdf file to a .txt file first. Then use this LocalTxTFileKnowledgeSource class instead.