In order to fix the issue, navigate to HP Support page, identify your printer model, select your operating system and download and install the latest drivers available. If it doesn't help, go to Start > Control Panel > Hardware and Sound > Devices and Printers > Add a printer and select the Add a local printer option. Select LPT2 instead of LPT1, click Next, select your printer and follow the provided instructions. Is you still have issues, go again to Add a local printer option and check the Create a new port box. Select Local port, click Next, enter a port name in this format:
\\[IP address of the host computer]\[The Share Name of the printer], select your printer and click Finish.
Note: To find the IP address of your computer, go to Start, type CMD and open the application using Administrator rights. After that type
ipconfig and press Enter. Your IP address is listed next to IPv4 Address. Also, to find the Share Name of the printer, go again to Command Prompt, type
net view and hit Enter. Note down the name of the network that your printer is using, type
net view \\ network name and check the printer's name.