I have solved the problem by formatting the hard drive and reinstalling the O/S from scratch and then downloading the Mobo drivers etc from HP and then installed the printer drivers then it worked fine.
It seems to have only been a problem when the system was rebuilt using the HP system recovery software.