Hello,
Thank you for the report, and for the precise diagnosis. Your analysis was right, and it led us straight to the cause.
The quoting is the symptom rather than the cause. What actually happens is that _getPDFInvoice() calls hikashop_absoluteURL() a second time, on the content assembled after each invoice has already been through it and through _preprocessImages(). By that point the src holds the local temp file that _preprocessImages() wrote, and the second pass puts the site address in front of it. hikashop_absoluteURL() only rewrites double-quoted attributes, which is exactly why invoice.php was the only layout affected and why your single-quote override worked around it. We removed that second call rather than changing the quoting, so all four layouts print the logo without an override.
Your two side notes were both real, and are fixed as well:
The allowed hosts list of html2pdf is now filled with the addresses of the shop, so an image read from an address no longer stops the invoice with "Unauthorized path host". This one came in with html2pdf 5.3.3, which the plugin picked up in 4.0.9. On top of that, the plugin now also strips the folder Joomla is installed in when it maps an image address onto a file on the server, so the logo is found locally in more cases and the question does not come up at all.
tempnam() creates the file under the name it returns, so appending '.png' meant the stub was never the file being deleted. Both names are removed now, in _preprocessImages() and for the Factur-X XML.
We've published version 4.1.4 of the plugin with the fixes. We tested it here on the four bundled layouts, with a logo read from a file and with a logo read from an address, and the logo is in the PDF in all of them.