Welcome to Apple Support Communities
From what I see, your printer is not compatible > http://support.apple.com/kb/ht3669#HP
At the moment, what you can do is to use Gutenprint to get your printer driver, as HP doesn't provide any driver for your printer in Mavericks > http://gimp-print.sourceforge.net/MacOSX.php
What do you see when you try to install it?
You may want to disable Gatekeeper before installing it. To do it, open System Preferences > Security and Privacy > General, and choose “Anywhere” under “Allow applications downloaded from”
Go to the Install Gutenprint 5.2.9.mpkg and right click on it - then select Open.
it should then present you with a simialr warning which you have presumably seen when trying to open it by double-clicking but with the additional option of opening the file.
Select the option to open and the file should then do as it is told!
This works for anything that you download and which doesn't meet with Apple's approval - usually applications, etc. which they have not vetted first.
However, having succssfully downlaoded and installed it - I cannot work out how to get my DeskJet 840C to print so any advice as to what to do next would be much appreicated!
I previously (OSX.6.8) printed via a wireless link through a router to an eMac running Tiger and thence through USB to the printer itself. That may sound a circuitious route, but the eMac and printer are upstairs and my main imac is downstairs.