Author Topic: Printing to a USB printer via the command line interface in XP?  (Read 1444 times)

Bogie

  • friend
  • Senior Member
  • ***
  • Posts: 10,261
  • Hunkered in South St. Louis, right by Route 66
    • Third Rate Pundit
Printing to a USB printer via the command line interface in XP?
« on: October 07, 2008, 04:41:34 PM »
(and it's gotta be XP...)
 
I've got a printer where I occasionally need to send it pre-processed files. Basically a sort of "sound check" for it...
 
When I had it plugged into the parallel port, it was easy...
 
copy checkup.prt lpt1:
 
Is there anyway I can do this sort of thing now that the computer that it is plugged into is only USB? And I'm out of card-room in the thing, so I can't easily add a parallel port.
 
Is there a "dos" name for the USB ports?
 
Blog under construction

41magsnub

  • friend
  • Senior Member
  • ***
  • Posts: 7,579
  • Don't make me assume my ultimate form!
Re: Printing to a USB printer via the command line interface in XP?
« Reply #1 on: October 07, 2008, 04:44:39 PM »
I have a crappy way to do it. 

1.  share the printer
2.  run a net use command such as:  net use lpt2: \\yourcomputername\sharename /persistent:yes
3.  print to LPT2

lee n. field

  • friend
  • Senior Member
  • ***
  • Posts: 13,615
  • tinpot megalomaniac, Paulbot, hardware goon
Re: Printing to a USB printer via the command line interface in XP?
« Reply #2 on: October 07, 2008, 05:11:46 PM »
I've got a vague recollection of trying to get this to work years ago.  I don't think you can.  I think  Windows (at least W2K) complains when you try to do the printer redirection.
In thy presence is fulness of joy.
At thy right hand pleasures for evermore.

AZRedhawk44

  • friends
  • Senior Member
  • ***
  • Posts: 13,987
Re: Printing to a USB printer via the command line interface in XP?
« Reply #3 on: October 07, 2008, 05:14:26 PM »
What application is actually doing the printing?

I wrote a program a few years ago that generated dynamic HTML, called Internet Explorer to view the newly created page, then run through a "printer" that was a PDF engine using IE API's to initiate a print job, and finally save the file.  Sending to a real printer would be easier since you don't have to specify an output file for the PDF engine.

Word?  IE?  Acrobat?
"But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist."
--Lysander Spooner

I reject your authoritah!

mtnbkr

  • friend
  • Senior Member
  • ***
  • Posts: 15,388
Re: Printing to a USB printer via the command line interface in XP?
« Reply #4 on: October 07, 2008, 05:23:22 PM »
This link echoes what 41mag said, plus adds another method that appears to pipe the doc through notepad, then printing.  I just tested that method and it works fine.

http://windowsitpro.com/article/articleid/39674/how-can-i-print-to-a-usb-printer-from-the-command-prompt.html

Chris

Bogie

  • friend
  • Senior Member
  • ***
  • Posts: 10,261
  • Hunkered in South St. Louis, right by Route 66
    • Third Rate Pundit
Re: Printing to a USB printer via the command line interface in XP?
« Reply #5 on: October 07, 2008, 10:19:44 PM »
The printer doesn't play well with anything but highly specialized postscript RIPs...
 
Ergo, if you have a file that you use occasionally, it is better to RIP it, and then save the file to disk, to then occasionally send to the printer. If it is a periodic thing, it's even better if you can automate it... Thanks, guys... I think that may have solved the troublem.
 
Blog under construction

roo_ster

  • Kakistocracy--It's What's For Dinner.
  • friend
  • Senior Member
  • ***
  • Posts: 21,225
  • Hoist the black flag, and begin slitting throats
Re: Printing to a USB printer via the command line interface in XP?
« Reply #6 on: October 08, 2008, 12:29:37 AM »
Install cygwin & cygwin-X and learn the joys of a real command-line interface.

lp, enscript, & other options.
Regards,

roo_ster

“Fallacies do not cease to be fallacies because they become fashions.”
----G.K. Chesterton