If your printer cost $500 or less, it is better to buy a new printer.  The reasoning behind it is that printer repair costs about two hours, plus the cost of the replacement part.

If you printer cost more than $500 it is a great choice to get it repaired.  Calculated three weeks repair time, because they have to order the parts and have a backup printer in the meantime.  Dropping of the printer at a repair center costs less, than getting it picked up and delivered.

Onsite: The technican comes and diagnoses.  The part gets ordered.  The technician comes back and installs the part.  If another part needs replacement, the technician orders the next part and comes back…This is why it is more cost efficient to drop the printer off at the service center or get it picked up, fixed and then delivered back to your office.

Hp Authorized Repair Center:

https://support.hp.com/us-en/help/service-center