If you trying to interface a thermal printer to the 16F877A, well the answer to your question is yes, it is possible provided you are able to write a very efficient code which can sit in 8Kb which i think is possible.
If you are using more external interfaces, chances are that you might run out of pins. Most thermal printers need about 20 odd pins for interface depending upon the kind of printer you are using.
Or as shankar suggested, if you have a ready module with UART interface, then all that you will need is a TX pin and a GND.