[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



Carl,

That is a piece of fine and convoluted programming. It certainly does to
job. I wish it could be easier, but apparently there is no simpler
solution. You can, of course, routinely dismiss the file with Ctrl-F4 or
rename it with CS-S so that you can keep it open in a PDF viewer.


Best regards,

Kari Eveli
LEXITEC Book Publishing (Finland)
lexitec@xxxxxxxx

*** Lexitec Online ***
Lexitec in English: http://www.lexitec.fi/english.html
Home page in Finnish: http://www.lexitec.fi/


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