|
Post by mdavid on Jan 30, 2019 21:19:30 GMT 1
Hi, I have the following bat file:
C:\UTL\DOSPRN\DOSprn.exe C:\SA2000\USER\S997\INPT997.PRT /printer:"HP885BA4 (HP OfficeJet Pro 7740 series)"
This doesn't return any error just:
C:\>
But there's no print output. How can I get this to print from vDos
The paths used are after using: USE C: C:\Aria\sade.
When I run it from Windows command prompt (with the full paths) it prints ok
Thanks David
|
|
|
Post by Jos on Jan 30, 2019 21:39:12 GMT 1
DOSPRN is a Windows program, so any path given to it should be that of the Windows filesystem, not that of vDos/DOS. In the Printing.pdf document there’s an example to use DOSPRN. I think there’s also documentation on the website of DOSPRN. Though those involve printing to (DOS) LPT/COM ports, not the roundabout of printing to a file.
Jos
|
|
|
Post by mdavid on Jan 31, 2019 1:44:03 GMT 1
Hi Jos, run into a small problem trying to run DOSPRN from vDos. I have the following bat file:
C:\Aria\sade\UTL\dosprn\DOSPRN\DOSprn.exe C:\Aria\sade\SA2000\USER\S997\KLITA997.PRT /printer:"HP885BA4 (HP OfficeJet Pro 7740 series)" /cpi:"20" /font:"Courier New" /codepage:"862"
This is all 1 line and when I run it from the vDos prompt it's truncated after the 128th character, the whole line is around 182 characters.
Is it possible to split the line into 2 or more lines? what would be the continuation character to indicate that a line continues on the next line?
Your help is much appreciated David
|
|
|
Post by Jos on Jan 31, 2019 8:45:56 GMT 1
If your program can only create a print file instead of printing to a DOS LPT/COM port, you could rename the .bat file to .cmd. So it becomes a Windows batch file that will be passed on to the Windows command line processor. Another option would be to change the .bat file to:
copy DOS-path-to-KLITA997.PRT lpt1
Jos
|
|
|
Post by mdavid on Jan 31, 2019 12:02:56 GMT 1
Hi, Copying to lpt1 prints the file, but I need the dosprn formatting like /codepage:"862" /cpi:"20", so when I copy .bat to .cmd and try to run from vDos prompt I still get "Bad command or file name". Will all commands run from within vDos be truncated to 128 characters?
Thanks David
|
|
|
Post by Jos on Jan 31, 2019 13:40:09 GMT 1
To run the .cmd file from the command prompt, you would have to precede it with “CMD /C”. For DOSPrn to handle writing to LPT1: It’s time to read the Printing.pdf document, it comes with an example for DOSPrn. Yes, all DOS command lines will be truncated to 128 (I thought it is even 126) characters.
Jos
|
|