Typically, printing applications such as MS Word and Notepad output text with text output commands. In this case, the print job contains text and the output PDF file will contain text.
Unfortunately, some applications, during the printing process, render the text in the internal buffer and output it as a bitmap image. For example, this is how Google Chrome and Microsoft Edge browsers work.
If you print an HTML, TEXT or PDF document from Google Chrome and Microsoft Edge browser, the print job will contain bitmap output commands instead of text. The virtual printer cannot extract text from this print job because it is not there. Therefore, you cannot search through the resulting document, and if you print to a text file, the resulting .txt file will be empty.
However, FireFox browser will print the content of your file as text. This can help you solve the printing problem.