[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: vDos users: be aware: can't print again if prior print has locked the port



Kari,
It seems that I can get PDF output with an explicit config.txt command like:

LPT1 = pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=my.pdf #LPT1.asc
My idea would be to have a batch file with 'if exist' clauses to overcome the limitation.
Just for the heck of it, I tried my hand at a batch file that
implements the temp file idea. It's self-maintaining, in that old temp
files no longer in use are erased. Since a unique filename is
generated for every print job, it does allow viewing the PDF output
without worrying about locked files.

The config.txt setting is:

LPT1 = start.exe /hid PCLPRINT.BAT #LPT1.asc

The batch file:

:: PCLPRINT.BAT
@echo off
cd/d %~dp0
if exist %TEMP%\vdlprn-*.pdf del/q %TEMP%\vdlprn-*.pdf >nul 2>nul
if exist PCLPRINT.PDF del/q PCLPRINT.PDF >nul 2>nul
start.exe /hid pcl6.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=PCLPRINT.PDF "%1"
timeout /t 2 /nobreak >nul
for /f "tokens=1-7 delims=,./: " %%s in ("%DATE%%TIME: =0%") do set tempfn=%TEMP%\vdlprn-%%t%%u%%v%%w%%x%%y.pdf
copy/y PCLPRINT.PDF %tempfn% >nul 2>nul
start.exe /hid %tempfn%
set tempfn=
goto :eof


--
Carl Distefano
cld@xxxxxxxx