When printing a source code file then it will end up printing the code as if it has a small area on the right to print into. So it ends up potentially breaking up each line on a per character wrap instead of printing as expected.
This can be reproduced by printing any source code file inside Qt Creator. Reproduced on macOS by printing to PDF, can also be reproduced on Windows so it is not specific to any platform.
Note: Printer operates with High Resolution