奇怪的打印问题

发布于 2024-10-27 23:43:33 字数 490 浏览 2 评论 0原文

我们网站上的某个页面在打印时无法正确显示!

我们在网站上还有一个打印按钮,当您按下它时,它会在一个新的弹出窗口中打开页面的“打印优化”版本,其中背景颜色被剥离等。它在该窗口中正确显示,但当我按下“确定”按钮时在打印对话框上它看起来仍然很糟糕。坦率地说,我什至不知道从哪里开始解决这个问题。任何帮助都会很棒!

当您从浏览器中按打印预览时,它也显示得很糟糕。页面在浏览器中看起来是一种方式,而在按下打印预览时看起来却完全不同,这怎么可能呢?该页面是使用基于 phptal 的模板制作的(不知道这是否相关)

谢谢!

更新: 我已经用 firebug 进行了测试并更改了样式表上的媒体。页面的主样式表似乎同时应用于屏幕和打印(我将其设置为全部),它只是打印预览与浏览器上的外观不同。

这个问题很有帮助

We have a certain page in our site that when you print, it doesn't come out properly!

We also have a print button on the site that when you press it opens a "printing optimized" version of the page in a new popup window with background colors stripped, etc. It shows up correctly in that window but when I press the ok button on the print dialog it still looks terrible. I frankly don't even know where to begin with this problem. Any help would be great!

When you press print preview from the browser, it shows up terrible as well. How could a page look one way in your browser and look completely different when you press print preview? The page is made using phptal based templates (don't know if that's relevant)

Thanks!

Update:
I've tested with firebug and changing the media on my stylesheets. It seems like the main stylesheet for the page IS being applied to both screen and print (I have it set to all), it just looks differently it print preview than it does on my browser.

This question was helpful

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一瞬间的火花 2024-11-03 23:43:33

经过一番搜索,我意识到该页面上的图像是作为背景图像输入的(在 div style="background-image..." 中)!这就是为什么浏览器会丢弃它们,而我却遇到了这种奇怪的行为。如果我将图像更改为实际的前景图像(img 标签),它就可以正常工作!

After some searching, I realized that the images on that page were coming in as background images (in the div style="background-image...")! That is why the browser was dropping them and I was getting this strange behavior. If I change the images to actual foreground images (img tag) it works just fine!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文