Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi...

 

I'm having a problem trying to print to DOS printer from a .net program.

 

I use the following line:

System.Diagnostics.Process.Start("PRINT", "/D:LPT1 " & Application.StartupPath & "\CodeBarPrint.txt")

'OR

System.Diagnostics.Process.Start("C:\WINDOWS\system32\PRINT.EXE", "/D:LPT1 " & Application.StartupPath & "\CodeBarPrint.txt")

'OR

System.Diagnostics.Process.Start("PRINT", Application.StartupPath & "\CodeBarPrint.txt")

 

but nothing is printed...

Tho, directly in the shell, the print command works and prints the file perfectly.

 

Notes:

1- This is running on a Windows 2003 Server machine

2- This has already worked with the last line of the example I've provided, on a Windows XP machine.

 

 

Thaks for any help...

 

Alex :p

Software bugs are impossible to detect by anybody except the end user.
Posted (edited)

I'm really far from knowing whats happening...

 

Even making an SQL Server 2000 Stored Procedure to call xp_cmdshell and execute the DOS print command, logged as SA, it doesn't work... Even tho, calling it from the Query Analyser it works...

 

My application must be wrapped on some kind of windows role that os blocking me to print to DOS...

 

Any help out there!!

 

Alex :p

Edited by AlexCode
Software bugs are impossible to detect by anybody except the end user.
Posted

I'm sorry for my next line but...

FFFFUUUUUUCCCCKKKKKKK!!!!!

 

haaaa... much better now...

 

Just to say that all this was happening because I wasn't using a DOS path...

I was using a file-to-print path with spaces and PRINT command doesn't recognise those... Damn stupid problems...

 

Thanks anyways...

 

Alex :p

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...