使图像在浏览器和打印中看起来正确?
我在我的商业网站上动态创建发票。发票的左上角是我公司的标志。我需要该徽标在网络上正确显示,而且打印清晰(我直接从加载的页面上打印)。目前,由于该图像是 72 ppi 的网络本机图像,因此打印效果不清晰。
如何打印清晰的徽标,同时在网页上正确显示它?
I dynamically create an invoice off my commerce site. At the top left of the invoice is my company logo. I need that logo to display correctly on the web, but also print sharp (I print directly off loaded page). Currently because the image is web native at 72 ppi, it does not print sharp.
How can I print the logo sharp while also displaying it correctly on the web page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将徽标放大 4 倍。假设徽标为 72x72 像素。将徽标设置为 288x288 并将其包含在您的发票 html 中,因为
它应该被浏览器缩小并打印得更好一些。如果它有效,并且您需要更高的分辨率,只需将徽标设置为您需要的大小即可。
Try making the logo 4 times bigger. Say the logo is 72x72 pixels. Make the logo 288x288 and include it in your invoice html as
It should be downsized by the browser and printed a bit better. If it works, and you need higher resolution, just make the logo as large as you need.