I managed to get something working that would save the printer output bytes to separate files so you could launch a viewer on them, like gv for postscript output.

A delay of 30 seconds will separate files.


Code
lp0 = manager:machine().luaprinters[1]
filenamebase=lp0:getprintername()
filenamecount=0
idlewaitperiod=30*60
idlecount=0


function feedchars(ch)
local idleflag=0
repeat
nextchar = lp0:getnextchar()
if nextchar >= 0 then 
  idleflag=1
  if f == nil then
    filenamecount = filenamecount+1
    currentfilename = filenamebase..string.format("%04d",filenamecount)..".ps"
    f=io.open(currentfilename,"w")
    idlecount=0
  end
  f:write(string.char(nextchar))
 end 
until nextchar < 0
if idleflag==0 then
  if f~=nil then
    idlecount=idlecount+1 
    if idlecount%(60*5)==0 then print ("idle: "..idlecount/60) end
  end
else
  idlecount=0 -- reset idlecount
end
if idlecount > idlewaitperiod then
  idlecount=-1
  f:close()
  f=nil
  os.execute('gv "'..currentfilename..'" &')
  print('gv '..currentfilename)
end
end

function framedispatch() for i,j in pairs(dispatchlist) do j() end end
emu.register_frame(framedispatch)
dispatchlist={feedchars}


Code
idle: 5.0
idle: 10.0
idle: 15.0
idle: 20.0
idle: 25.0
idle: 30.0
gv 2020-09-20 14-14-25 ct486-board4-lpt-lpt-centronics-luaprinter0004.ps