Windows Vista Forums

Error in Printing using "Print To File" and RAW Print mode
  1. #1



    Newbie
    Join Date : Mar 2008
    Posts : 4
    Vista Ultimate 32bit
    Local Time: 01:11 AM

    Error in Printing using "Print To File" and RAW Print mode

    I have an application that has worked for many years taking data from a Unix system and printing it to a Windows printer using the RAW mode.

    This program is written in "C" using standard OpenPrinter, ClosePrinter etc API calls. The DOC_INFO_1 pDataType - set to "RAW".

    In Vista, this works fine sending data to a physical printer. But, if the user sets the printer to "Print To File" for the port number, the print job hangs. When you look at the jobs in printer, the spool job shows "Error - Printing" and the printer in the control panel shows "Error".

    If I run another application, like Notepad, when the data is printed, I get the normal dialog box for "Output File Name".

    I cannot find any messages in the event viewer, so I don't know what the message means.

    I also tried a third party application, "Frogmore Raw Print" (Frogmore - Software for printing) and I get the same results.

    The printer is defined as an HP Laserjet 5 Printer, but I also get the same result if I define the printer has a Generic / Text Only printer, except the printer in the control panel goes into an Error state and there is no error message in the spool job detail form.

    Does anyone know why this is happening?

    I would appreciate any help.

    Doug


      My System SpecsSystem Spec

  2. #2


    Alan Morris [MSFT] Guest

    Re: Error in Printing using "Print To File" and RAW Print mode

    Make sure the application is not generating UI in session 0 since logging
    onto Vista is no longer session 0.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/search/?adv=1

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "DougFarmer123" <DougFarmer123.36we20@xxxxxx-mx.forums.net> wrote in message
    newsougFarmer123.36we20@xxxxxx-mx.forums.net...

    >
    > I have an application that has worked for many years taking data from a
    > Unix system and printing it to a Windows printer using the RAW mode.
    >
    > This program is written in "C" using standard OpenPrinter,
    > ClosePrinter etc API calls. The DOC_INFO_1 pDataType - set to \"RAW\".
    >
    > In Vista, this works fine sending data to a physical printer. But, if
    > the user sets the printer to \"Print To File\" for the port number, the
    > print job hangs. When you look at the jobs in printer, the spool job
    > shows \"Error - Printing\" and the printer in the control panel shows
    > \"Error\".
    >
    > If I run another application, like Notepad, when the data is printed, I
    > get the normal dialog box for \"Output File Name\".
    >
    > I cannot find any messages in the event viewer, so I don't know what
    > the message means.
    >
    > I also tried a third party application, \"Frogmore Raw Print\"
    > ('Frogmore - Software for printing'
    > (http://www.frogmore-raw-print.com/)) and I get the same results.
    >
    > The printer is defined as an HP Laserjet 5 Printer, but I also get the
    > same result if I define the printer has a Generic / Text Only printer,
    > except the printer in the control panel goes into an Error state and
    > there is no error message in the spool job detail form.
    >
    > Does anyone know why this is happening?
    >
    > I would appreciate any help.
    >
    > Doug
    >
    >
    > --
    > DougFarmer123


      My System SpecsSystem Spec

  3. #3



    Newbie
    Join Date : Mar 2008
    Posts : 4
    Vista Ultimate 32bit
    Local Time: 01:11 AM


      Thread Starter

    Re: Error in Printing using "Print To File" and RAW Print mode

    Alan,

    Both of these applications are windows forms applications. My application uses a telnet session to talk to a Unix host. The 3rd part application asks for a file to print and then sends it to a printer in RAW mode.

    Everything else works in both applications. All UI functionality is present.

    I am not sure of your meaning regarding session 0. I have only used session numbers when working with CITRIX and then only to determine which session number I was currently assigned.

    Doug

      My System SpecsSystem Spec

  4. #4


    Alan Morris [MSFT] Guest

    Re: Error in Printing using "Print To File" and RAW Print mode

    Same thing. Will the application work when using remote desktop to another
    Vista machine?

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/search/?adv=1

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "DougFarmer123" <DougFarmer123.36xrd0@xxxxxx-mx.forums.net> wrote in message
    newsougFarmer123.36xrd0@xxxxxx-mx.forums.net...

    >
    > Alan,
    >
    > Both of these applications are windows forms applications. My
    > application uses a telnet session to talk to a Unix host. The 3rd part
    > application asks for a file to print and then sends it to a printer in
    > RAW mode.
    >
    > Everything else works in both applications. All UI functionality is
    > present.
    >
    > I am not sure of your meaning regarding session 0. I have only used
    > session numbers when working with CITRIX and then only to determine
    > which session number I was currently assigned.
    >
    > Doug
    >
    >
    > --
    > DougFarmer123


      My System SpecsSystem Spec

  5. #5



    Newbie
    Join Date : Mar 2008
    Posts : 4
    Vista Ultimate 32bit
    Local Time: 01:11 AM


      Thread Starter

    Re: Error in Printing using "Print To File" and RAW Print mode

    Alan,

    I set up a remote desktop session from an XP machine, to the Vista machine and logged in as a user with Administrator priviledges. I ran both my program and the 3rd party program and still the same result. If I watch the printer form (with the jobs displaying), I first see a status of "Spooling" immediately followed by "Error - Printing". If I then open up Control Panel -> Printers, the printer shows 1 job, with the word "Error" below it.

    I've attached some screen shots if that helps

    Thanks for responding!!!

    Doug

      My System SpecsSystem Spec

  6. #6


    Alan Morris [MSFT] Guest

    Re: Error in Printing using "Print To File" and RAW Print mode

    Check the system eventlog for print errors

    Also enable informational events for the spooler in Printers Folder, right
    click any white space, Run as administrator, Server Properties, Advanced.

    I did not get the image files. It's okay.

    Where are the files getting written to? Make sure the user has write access
    to this folder. If the app writes to %windir%\temp, the user context does
    not have write access in Vista.

    Error 5 is access denied.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/search/?adv=1

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "DougFarmer123" <DougFarmer123.36y4k6@xxxxxx-mx.forums.net> wrote in message
    newsougFarmer123.36y4k6@xxxxxx-mx.forums.net...

    >
    > Alan,
    >
    > I set up a remote desktop session from an XP machine, to the Vista
    > machine and logged in as a user with Administrator priviledges. I ran
    > both my program and the 3rd party program and still the same result. If
    > I watch the printer form (with the jobs displaying), I first see a
    > status of "Spooling" immediately followed by "Error - Printing". If I
    > then open up Control Panel -> Printers, the printer shows 1 job, with
    > the word "Error" below it.
    >
    > I've attached some screen shots if that helps
    >
    > Thanks for responding!!!
    >
    > Doug
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: Properties.JPG |
    > |Download: http://vista64.net/forums/attachment.php?attachmentid=3229|
    > +-------------------------------------------------------------------+
    >
    > --
    > DougFarmer123


      My System SpecsSystem Spec

  7. #7



    Newbie
    Join Date : Mar 2008
    Posts : 4
    Vista Ultimate 32bit
    Local Time: 01:11 AM


      Thread Starter

    Re: Error in Printing using "Print To File" and RAW Print mode

    Hi Alan,

    I enabled informational messages as you suggested, cleared the Application Events, System Events and Security Events and made sure the queue was clear. When I run the application, I still get the error, but there is nothing in the event log (except the event that says I cleared the event log). I also checked the Applications and Services logs, and no messages their either.

    As for where the printer writes the file, that is prompted for at run time. Every time you send a file to the printer (in non RAW mode), a dialog box pops up and asks for the file name. You can enter the entire path.

    I do not get that far, no dialog box pops up.

    If you use the web interface for the forum, you will be able to get the attachments (if you want to look).

    Again, thanks for the ongoing conversation!

    Doug

      My System SpecsSystem Spec

Error in Printing using "Print To File" and RAW Print mode problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing a web page using "Print to File" garaboldi General Discussion 2 03 Mar 2010
Server2K Print Server, stuck "Deleting" a print job John Server General 2 25 Sep 2009
Solved Error "Could Not Open The File: Access Denied" setting up print to file ijope General Discussion 1 22 Feb 2009
Printer appears in "Printers" window, but not in File > Print dropdown list Charles Blaquière Vista print fax & scan 2 30 Jan 2008
only partial pages print, print job in "error" state bheiser Vista print fax & scan 5 14 Jan 2008