DrawBitmap: logoname$ = 'logo1.jpg' fromfile$ = path('COS') fromfile$ = ucase(fromfile$) if sub(fromfile$,1,2) = 'E:' fromfile$ = '\\hpac1' + sub(fromfile$,3,250) fromfile$ = strip(fromfile$) + logoname$ devstatus$ = ucase(zlp$) if sub(devstatus$,1,2) = 'LX' then ! if printing to pdf printer, cosFileSpec$ = strip(fromfile$) ! must get the logo from the server COS directory goto load.bitmap.from.host endif ! msgbox fromfile$ ! tofile$ = path('TMP') if logo.already.loaded = 0 then gosub Display.Message.Window else handle1$ = '' endif flags = 0 devstatus$ = dstat(term$) if sub(devstatus$,21,1) = "@01@" flags = 1 print (getdiralias='images',flags) input (0,resultfmt) gosub convert.results write (#,convertfmt) & input (#,fileinfo) wh = pos("@00@",result$) if wh gt 0 then result$ = sub(result$,1,wh-1) endif tofile$ = strip(result$) wh = len(tofile$) if sub(tofile$,wh,1) ne '\' tofile$ = tofile$ + '\' aliaspath$ = tofile$ tofile$ = '$(images)\' + strip(logoname$) ! msgbox tofile$ flags = 0 devstatus$ = dstat(term$) if sub(devstatus$,21,1) = "@01@" flags = 512 print (0) (copyfile=fromfile$,tofile$,flags) input (0,resultfmt) gosub convert.results if fileerror eq 80 goto ok.2.load.logo if funcerror ne 1 then msgline$ = 'funcerror: ' + str(funcerror) + '@0D0A@' + _ 'fileerror: ' + str(fileerror) & msgbox msgline$ data$ = '' goto Untable.to.load.bitmap endif ok.2.load.logo: ! if strip(handle1$) ne '' logo.already.loaded = 1 & gosub remove.message.window cosFileNames$ = logoname$ cosDirNames$ = 'cos' ! Search Comet directory for the completed DOS filename Gosub COS.FindFile cosfilespec$ = strip(path('cos')) + logoname$ devstatus$ = dstat(term$) if sub(devstatus$,21,1) = "@01@" then cosfilespec$ = aliaspath$ ! msgbox cosfilespec$ cosfilespec$ = cosfilespec$ + logoname$ endif load.bitmap.from.host: ! Data$ = cosFileSpec$ ! msgbox data$ Untable.to.load.bitmap: ! IF (Data$ EQ "") Print (0) "Couldn't load bitmap file '";cosFileNames$;",";cosDirNames$;"'" Input (0) "" ELSE ! Scale 1 bitmap pixel equals .01in. Flags = BMR.SCALE FLAGS = BMR.FIT.TO.RECT ! Printer scale is TWIPS.PER.INCH * 100 (BMR.SCALE must be set) Print (PtrLun) (TR);(Drawimage= RectLeft, RectTop, _ RectRight, RectBottom, TWIPS.PER.INCH, TWIPS.PER.INCH, Flags,cosfilespec$) !;Data$ ENDIF if strip(handle1$) ne '' gosub remove.message.window Return ! DrawBitmap