Fix the missing custom size option for HP inkjet printers
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.
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.