If you do not see a Custom option in the Size drop down menu, your printer's driver does not support custom sizes. For some reason as yet unknown, HP removed this feature from many printers starting in 2013.
Below is a potential fix for the problem. Because it is a "hack", we can offer no guarantee it will work on your system. Just give it a try and find out.
Go to devices and printers, locate your HP printer, right click and choose Printer Properties.
In the printer properties, click on the Advanced tab then click "New Driver" button.
Click Next to begin
Click on Windows Update to ensure the list of printers is fully populated (this may take a few minutes).
After the update finishes, scroll through the list of companies to HP and locate the HP Deskjet 9800 Printer.
Then scroll through the printers window to HP Deskjet 9800 and select it.
Click the Next button.
Now the printer is setup to use the Deskjet 9800 driver for custom print sizes.
Since the Deskjet 9800 is controlling your printer, you may want to go back to the original driver at some point.
* Open the Devices and Printers folder
* Right click on the Printer (most likely called HP Deskjet 9800 printer now)
* Select Printer Properties
* Select the Advanced tab
* Click the drop down menu next to "Driver:"
* Select the your printer model from the drop down
* Click Ok to set the driver choice