Easiest explanation would be a wrong dpi resolution. Dump printer.resolution() and check whether it makes sense for the printer you have. You can also try to change the DPI setting using printer.setResolution(dpi)