从 Internet Explorer 打印并得到 20 页的附记
我有一个非常简单的网页,通常可以在许多不同的计算机上从 IE 正确打印。页面本身只是一个 html 表格和一个标题。我尝试打印 Google 的主页并且打印正确,因此此问题特定于我的页面。
页面在打印预览中看起来正确。然而,当它从打印机中出来时,有大约 20 页的内容,看起来像是后记和十六进制。
第一页包含我页面的查询字符串的一部分(有一堆参数)。接下来是一串开始的行:
@PJL COMMENT XRXbegin
@PJL COMMENT OID_ATT_JOB_OWNER "**user's name not included**'
@PGL COMMENT OID_ATT_JOB_NAME "** my url **
..etc
then
%!PS-Adobe-3.0
%%Title: **my url again**
%%Creator: PScript5.dll Version 5.2.2
..etc
then
%%BeginResource: file Pscript_WinNT_ErrorHandler 5.0 0
then
lot's of what I'm assuming is postscript then about 20 pages of hexadecimal
this is the html
<body onLoad="window.print();" style="font-size:150%">
<div style="width:750px">
<div>
<span class="fieldName">Email:</span>
<span class="fieldValue">an email address </span>
</div>
<div>
<span class="fieldName">Date:</span>
<span class="fieldValue">2/18/2012 8:16 PM</span>
</div>
</div>
<div class="nopass"><!-- clears floats --></div>
</body>
I have a very simple webpage that normally prints correctly from IE on many different computers. The page itself is just an html table and a heading. I tried printing Google's homepage and it printed correctly, so this this issue is specific to my page.
The page looks correct in the print preview. However, when it comes out of the printer there are about 20 pages of what appears to be postscript and hexadecimal.
The first page has part of my page's query string (there are a bunch of parameters). This is followed by a bunch of lines that start:
@PJL COMMENT XRXbegin
@PJL COMMENT OID_ATT_JOB_OWNER "**user's name not included**'
@PGL COMMENT OID_ATT_JOB_NAME "** my url **
..etc
then
%!PS-Adobe-3.0
%%Title: **my url again**
%%Creator: PScript5.dll Version 5.2.2
..etc
then
%%BeginResource: file Pscript_WinNT_ErrorHandler 5.0 0
then
lot's of what I'm assuming is postscript then about 20 pages of hexadecimal
this is the html
<body onLoad="window.print();" style="font-size:150%">
<div style="width:750px">
<div>
<span class="fieldName">Email:</span>
<span class="fieldValue">an email address </span>
</div>
<div>
<span class="fieldName">Date:</span>
<span class="fieldValue">2/18/2012 8:16 PM</span>
</div>
</div>
<div class="nopass"><!-- clears floats --></div>
</body>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我15年前就遇到过这个问题。我认为发生的情况是您使用了错误的打印机驱动程序来发送到打印机。当 IE 生成以页面描述语言打印页面的代码时,它会添加一个序言(在本例中是以“%!PS-Adobe-3.0”开头的行之前的所有内容)
当您将此文件发送到打印机时,它无法识别序言,因此假设接下来的所有内容都只是原始文本。您可以看出它正在这样做,因为它是以平淡的固定宽度字体打印的。
两个修复:
为要打印的打印机选择正确的打印机驱动程序。如果尚未安装,您可能需要安装它。
打印。
或者:
15 年前,我在网络连接打印机上完成了此操作,当时我从客户那里收到了很多原始 Postscript 文件,我需要在高速数字印刷机上打印它们。显然,首选解决方案是最佳解决方案,但我认为另一个解决方案可以帮助您了解正在发生的情况。
更新:“XRX开始
序言中的“似乎表明您使用的驱动程序来自 Xerox。
由于 URL 对于您尝试打印的页面来说是唯一的,因此实际名称可能会使打印机感到困惑。URL 中可能有一个百分号,或者可能是无论 HP 的 PCL 语言使用什么。
I ran into this issue 15 years ago. What I think is happening is that you are using the wrong printer driver for the printer you are sending to. When IE generates the code to print the page in a page description language, it's adding a preamble (which in this case is everything before the line that starts as "%!PS-Adobe-3.0")
When you send this file to the printer, it does not recognise the preamble, and therefore assumed everything that follows is just raw text. You can tell it's doing this because it is printed in a bland fixed width font.
Two fixes:
Select the proper printer driver for the printer you want to print to. You may need to install it if it is not already.
Print.
or:
I did this on a network attached printer 15 years ago when we I got a lot of raw postscript files from a customer and I needed to print them on a high speed digital press. Obviously, the preferred solution is the top solution, but I though this other one would help you understand what is going on.
Update: "XRXbegin
" in the preamble seems to indicate the driver you are using is from Xerox.
Since the URL is unique to the page you are trying to print, the actual name might be confusing the printer. The URL might have a percent bang in it or maybe whatever is used for HP's PCL language.