I have a common, all-in-one HP printer. When you replace the print cartridges, you have to perform a printer realignment. Nowadays, this is a self-test the printer can perform by printing a test sheet with a pattern on it. One simply scans the test sheets, and magically the printer re-aligns itself. The question is: How can a non-aligned printer print a test page that will be used to self-align the printer? It’s akin to the blind leading the blind, isn’t it? How does this work?
It prints a bunch of different patterns on the alignment sheet and it has clear expectations as to what they should look like if it was properly aligned - from the specific way in which each pattern is different from expectations, it can deduce the way that the alignment needs to be adjusted.
The alignment is usually pretty minor. If the alignment was really off the printed images would look bad in day-to-day use.
Have you done a “manual” alignment?
Various groups of short lines are drawn. With the segments offset a bit in each one. One row are horizontal, another vertical. Under each is a number. You tell the alignment program which ones line up best.
To automate this with a print and scan isn’t that hard. They can even do a more complicated pattern and do a better job.