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

Discussion in 'Windows Vista Printing / Faxing / Scanning' started by DougFarmer123, Mar 26, 2008.

  1. 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, Mar 26, 2008
    #1
    1. Advertisements

  2. 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.
     
    Alan Morris [MSFT], Mar 26, 2008
    #2
    1. Advertisements

  3. 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, Mar 27, 2008
    #3
  4. 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.
     
    Alan Morris [MSFT], Mar 27, 2008
    #4
  5. 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, Mar 27, 2008
    #5
  6. 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.
     
    Alan Morris [MSFT], Mar 27, 2008
    #6
  7. 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
     
    DougFarmer123, Mar 27, 2008
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.