Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista print fax & scan

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

Reply
 
Old 03-26-2008   #1 (permalink)


Vista Ultimate 32bit
 
 

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
Old 03-26-2008   #2 (permalink)
Alan Morris [MSFT]


 
 

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...
Quote:

>
> 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
Old 03-27-2008   #3 (permalink)


Vista Ultimate 32bit
 
 

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
Old 03-27-2008   #4 (permalink)
Alan Morris [MSFT]


 
 

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...
Quote:

>
> 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
Old 03-27-2008   #5 (permalink)


Vista Ultimate 32bit
 
 

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
Attached Thumbnails
printers.jpg   printjobs.jpg   properties.jpg  
My System SpecsSystem Spec
Old 03-27-2008   #6 (permalink)
Alan Morris [MSFT]


 
 

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...
Quote:

>
> 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
Old 03-27-2008   #7 (permalink)


Vista Ultimate 32bit
 
 

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
Reply

Thread Tools


Similar Threads
Thread Forum
printing a file created by the windows printing dialog (print to f PowerShell
Solved Error "Could Not Open The File: Access Denied" setting up print to file General Discussion
Printer appears in "Printers" window, but not in File > Print dropdown list Vista print fax & scan
only partial pages print, print job in "error" state Vista print fax & scan
error in vista using "Print Friendly Version" option Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46