- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(Win 2000, CVF 6.5)
I am having some problem in the apparently
simple task of printing a closed ASCII file to
a Network Printer defined as default printer.
I tried, without success:
!- first attempt ---------------------
USE MSFLIB
logical(4) result
open(unit=1,file='d:mydirmyfile.txt',status='old')
close(unit=1,disp='PRINT')
pause
end
!- end first -------------------------
tryed, without success:
!---- Second attempt ----------------
...
call SYSTEMQQ('PRINT /d:PRN_NAME myfilename.txt')
...
!--- end second attempt -------------
tryed, without success:
!---- Third attempt ----------------
...
call SYSTEMQQ('PRINT /d:PRN_PORT_NAME myfilename.txt')
...
!--- end third attempt -------------
Whar could I do?
Thanks,
ke
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the file is just ASCII text you can write a loop that reads a line at a time and copies it to the printer device. I have done a similar thing in the past.
You could also try the printing program that Steve Lionel developed and has mentioned in this forum. I don't recall its name at the moment, though.
Mike
You could also try the printing program that Steve Lionel developed and has mentioned in this forum. I don't recall its name at the moment, though.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a shareware program called PCPS32.EXE for
windows (versions for UNIX and other systems also
available) that I use to send an ASCII text file to
a network printer.
After mapping lpt3 to the printer using, for example:
Iwould then use batch files with the filename as argument, thus:
for portrait and landscape orientations.
These commands can be issued using calls to SYSTEMQQ etc. The batch files are:
HTH.
windows (versions for UNIX and other systems also
available) that I use to send an ASCII text file to
a network printer.
After mapping lpt3 to the printer using, for example:
NET USE LPT3: servernameprintername
Iwould then use batch files with the filename as argument, thus:
PSPORT FILENAME.TXT PSLAND FILENAME.TXT
for portrait and landscape orientations.
These commands can be issued using calls to SYSTEMQQ etc. The batch files are:
@ECHO OFF REM FILE: PSPORT.BAT REM COMMAND: PSPORT filename REM FUNCTION: TO CALL PCPS32.EXE TO PRINT AN ASCII FILE filename rem TO A POSTSCRIPT PRINTER QUEUE REM LPT3 IS PRESENTLY DESIGNATED AS THE POST-SCRIPT PRINTER. REM REM THE FLAG -ro- KEEPS PORTRAIT ORIENTATION BY SUPPRESSING REM THE ROATATION THROUGH 90 DEGREES WHICH GIVES LANDSCAPE REM THE FLAG -qu SUPRESSES ALL BUT THE MINIMUM SCREEN OUTPUT REM THE FLAG -of DEFINES THE POST-SCRIPT PRINTER QUEUE OR FILE REM THE FLAG -fo DEFINES THE FONT -foc8 DEFINES COURIER 8-POINT IF "%1" == "" GOTO NOFILE C:PCPSPCPS32.EXE -ro- -foc8 -qu -ofLPT3 %1 GOTO EXIT :NOFILE ECHO NO FILENAME GIVEN TO PSPORT...IGNORING COMMAND :EXITand
@ECHO OFF REM FILE: PSLAND.BAT REM COMMAND: PSLAND filename REM FUNCTION: TO CALL PCPSD.EXE TO PRINT AN ASCII FILE filename rem TO A POSTSCRIPT PRINTER QUEUE REM LPT3 IS PRESENTLY DESIGNATED AS THE POST-SCRIPT PRINTER. REM REM THE FLAG -ro ROTATES THE OUTPUT TO LANDSCAPE FORMAT REM THE FLAG -qu SUPRESSES ALL BUT THE MINIMUM SCREEN OUTPUT REM THE FLAG -of DEFINES THE POST-SCRIPT PRINTER QUEUE OR FILE REM THE FLAG -fo DEFINES THE FONT -foc8 DEFINES COURIER 8-POINT REM IF"%1"=="" GOTO NOFILE C:PCPSPCPSD.EXE -ro -foc8 -qu -ofLPT3 %1 GOTO EXIT :NOFILE ECHO NO FILENAME GIVEN TO PSLAND...IGNORING COMMAND :EXIT
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program (actually a callable routine) Mike refers to is on the CVF kit sample area as FORPRINT - you can also get a copy of it here
Steve
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page