-2

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>
dan
  • 9,712
  • 6
  • 49
  • 62
  • I'm not sure what kind of help you expect to get without showing your page's HTML. – Sparky Feb 21 '12 at 04:30
  • I doubt it's something you can fix by fixing your HTML. Looks like an issue with IE and/or the printer driver. If it *renders* in IE, even if it's broken HTML, the print output should not print postscript. – deceze Feb 21 '12 at 04:38
  • @deceze true, but other pages print correctly which leads me to believe something on my page might be causing it. – dan Feb 21 '12 at 05:24

1 Answers1

2

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:

  1. Select the proper printer driver for the printer you want to print to. You may need to install it if it is not already.

  2. Print.

or:

  1. Check "print to file". Save to file.
  2. Open up the raw postscript output and edit out the preamble.
  3. open a dos window
  4. set the printer you want to print to to something like :lpt1
  5. I don't remember the exact syntax in dos any more but it's probably: copy file.pdf :lpt1
  6. you printer must support postscript, and must do so without needing a preamble.

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.

user886694
  • 55
  • 7