Not able to replicate the issue at my end.
Which version of ERPNext you are using? Also is it a standard print format or custom print format?
Also, check by adding host_name in site_config.json
vim frappe-bench/sites/site_name/site_config.json
{
"db_name": db_name,
"db_password": db_password,
"host_name": "http://yourerpnextsite"
}