There are many reasons that your HP printer might be causing black lines on the page....
Inside the HP printer the paper is moved along by rollers and conveyor belt (transfer belt). this happens when the rollers or the transfer belt inside the printer get dirty.
Dry the glass completely with a clean,dry, lint- free cloth to avoid spots from the glass cleaner.
Sometimes printer behaves in odd ways than you need to reboot the printer. HP recommends that you power your printer on than remove the cord from the back of the printer itself. then unplug the cord from the outlet and wait at least 15 sec. than you can connect the power cord an turn the printer back on
Sometimes if you are not correctly installing your printer cartridge, causes the black line on-page.you need to again reinstall the cartridge in HP printer.
If your problem does not get fix you still getting a black line on HP printer printed page than you contact your Hp customer services and tell them I have tried everything.