there can be different reasons that can lead to this. I would guess that wkhtmltopdf cannot access the references resources (CSS and imgs). This can be caused e.g.
by a firewall blocking these intra-zone calls
the hostname configuration of ERPNext (see site/site1.local/site_config.json should contain "host_name": "https://www.yourdomain.com",)
by a missing libssl1.0-dev (normally missing in Debian 9)
You can also troubleshoot by extracting the html that goes to wkhtmltopdf by temporarily setting a frappe.throw(html) after line 12 of frappe/utils/pdf.py and then running wkhtmltopdf file.html file.pdf on the server (where file.html is a blank html file with the extracted html code from before) and observe the error messages.