diff --git a/library/PDFSTREAM b/library/PDFSTREAM
index d96b6716..aee1b3fd 100644
--- a/library/PDFSTREAM
+++ b/library/PDFSTREAM
@@ -1,12 +1,13 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "17-Jul-2023 22:33:21" {WMEDLEY}<library>PDFSTREAM.;38 12982  
+(FILECREATED "24-Jul-2023 10:37:31" {WMEDLEY}<library>PDFSTREAM.;44 13139  
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS CLOSE-PDF-STREAM)
+      :CHANGES-TO (VARS PDFSTREAMCOMS)
+                  (FNS PDF.HARDCOPYW CLOSE-PDF-STREAM PS-TO-PDF PDF-CONVERT)
 
-      :PREVIOUS-DATE " 2-Jul-2023 17:00:18" {WMEDLEY}<library>PDFSTREAM.;37)
+      :PREVIOUS-DATE "19-Jul-2023 09:28:33" {WMEDLEY}<library>PDFSTREAM.;40)
 
 
 (PRETTYCOMPRINT PDFSTREAMCOMS)
@@ -27,15 +28,18 @@
                                       (FONTCREATE POSTSCRIPT.FONTCREATE)
                                       (FONTSAVAILABLE POSTSCRIPT.FONTSAVAILABLE)
                                       (CREATECHARSET \CREATECHARSET.PSC]
-        (DECLARE%: EVAL@COMPILE DONTCOPY (FILES EXPORTS.ALL (LOADCOMP)
-                                                POSTSCRIPTSTREAM))
+        (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (FROM LOADUPS)
+                                                EXPORTS.ALL)
+               (FILES (LOADCOMP)
+                      POSTSCRIPTSTREAM))
         (FNS PDFFILEP PDF.HARDCOPYW PDF.TEXT PDF.TEDIT)
         (INITVARS (PDFCONVERTER 'ps2pdf))
         (ALISTS (PDF-CONVERTER-TEMPLATES ps2pdf pstopdf))
         (VARS (DEFAULTPRINTERTYPE 'PDF))
         (GLOBALVARS PDFCONVERTER \PDFIMAGEOPS PDF-CONVERTER-TEMPLATES)
-        (FNS PDF-INIT OPEN-PDF-STREAM CLOSE-PDF-STREAM PDF-CONVERT)
-        (P (PDF-INIT))))
+        (FNS PDF-INIT OPEN-PDF-STREAM CLOSE-PDF-STREAM PS-TO-PDF)
+        (P (MOVD? 'CL:IDENTITY 'TRUEFILENAME)
+           (PDF-INIT))))
 
 (ADDTOVAR PRINTERTYPES ((PDF)
                         (CANPRINT (PDF))
@@ -55,7 +59,11 @@
                                 (CREATECHARSET \CREATECHARSET.PSC)))
 (DECLARE%: EVAL@COMPILE DONTCOPY 
 
-(FILESLOAD EXPORTS.ALL (LOADCOMP)
+(FILESLOAD (FROM LOADUPS)
+       EXPORTS.ALL)
+
+
+(FILESLOAD (LOADCOMP)
        POSTSCRIPTSTREAM)
 )
 (DEFINEQ
@@ -81,10 +89,11 @@
                    (SETFILEPTR FILE 0)))])
 
 (PDF.HARDCOPYW
-  [LAMBDA (FILE BITMAP SCALEFACTOR REGION Landscape? TITLE)  (* ; "Edited 23-Jun-2023 13:28 by rmk")
+  [LAMBDA (FILE BITMAP SCALEFACTOR REGION Landscape? TITLE)  (* ; "Edited 24-Jul-2023 10:37 by rmk")
+                                                             (* ; "Edited 23-Jun-2023 13:28 by rmk")
                                                              (* ; "Edited  6-Mar-2023 22:43 by rmk")
     (LET ((PSTTMP (PACKFILENAME 'EXTENSION 'TMPPS 'BODY FILE)))
-         (PDF-CONVERT (POSTSCRIPT.HARDCOPYW PSTTMP FILE BITMAP SCALEFACTOR REGION Landscape? TITLE)
+         (PS-TO-PDF (POSTSCRIPT.HARDCOPYW PSTTMP FILE BITMAP SCALEFACTOR REGION Landscape? TITLE)
                 FILE])
 
 (PDF.TEXT
@@ -105,9 +114,8 @@
 
 (RPAQ? PDFCONVERTER 'ps2pdf)
 
-(ADDTOVAR PDF-CONVERTER-TEMPLATES (ps2pdf " " PSTMPFILENAME " " PDFTMPFILENAME " 2> " ERRORFILENAME)
-                                  (pstopdf " " PSTMPFILENAME " -o " PDFTMPFILENAME " 2> " 
-                                         ERRORFILENAME))
+(ADDTOVAR PDF-CONVERTER-TEMPLATES (ps2pdf " " PSFILE " " PDFFILE " 2> " ERRORFILE)
+                                  (pstopdf " " PSFILE " -o " PDFFILE " 2> " ERRORFILE))
 
 (RPAQQ DEFAULTPRINTERTYPE PDF)
 (DECLARE%: DOEVAL@COMPILE DONTCOPY
@@ -160,7 +168,8 @@
                 PSSTREAM])
 
 (CLOSE-PDF-STREAM
-  [LAMBDA (PSSTREAM)                                         (* ; "Edited 17-Jul-2023 22:32 by rmk")
+  [LAMBDA (PSSTREAM)                                         (* ; "Edited 24-Jul-2023 10:37 by rmk")
+                                                             (* ; "Edited 17-Jul-2023 22:32 by rmk")
                                                              (* ; "Edited 24-Jun-2023 13:57 by rmk")
 
     (* ;; "PSSTREAM is a tmp/ postscript rendition of what is intended to end up as a pdf.  If we are going directly to a printer, we can probably just pass it along without worrying about conversion.  In fact, in that case we probably should not have bothered even setting up the PDF stream.")
@@ -171,25 +180,29 @@
 
     (CL:WHEN (EQ \PDFIMAGEOPS (fetch (STREAM IMAGEOPS) of PSSTREAM))
         (replace (STREAM IMAGEOPS) of PSSTREAM with \POSTSCRIPTIMAGEOPS)
-        (PDF-CONVERT (CLOSEF PSSTREAM)
+        (RENAMEFILE (PS-TO-PDF (CLOSEF PSSTREAM))
                (fetch (\POSTSCRIPTDATA POSTSCRIPTTARGETINFO) of (fetch (STREAM IMAGEDATA)
                                                                    of PSSTREAM))))])
 
-(PDF-CONVERT
-  [LAMBDA (PSTMPFILENAME TARGETPDFNAME DONTDELETE)           (* ; "Edited 24-Jun-2023 15:01 by rmk")
+(PS-TO-PDF
+  [LAMBDA (PSFILE PDFFILE DONTDELETE)                        (* ; "Edited 23-Jul-2023 22:30 by rmk")
+                                                             (* ; "Edited 24-Jun-2023 15:01 by rmk")
                                                              (* ; "Edited 16-Jul-2022 13:06 by rmk")
                                                              (* ; "Edited  8-Jul-2022 10:20 by rmk")
                                                              (* ; "Edited  7-May-2022 22:40 by rmk")
                                                             (* ; "Edited  7-Oct-2021 11:15 by rmk:")
 
-    (* ;; "PSTMPFILENAME is the name of a closed PS file in a Unix tmp directory.  This function uses the PDFCONVERTER utility to convert that to a parallel pdf file, which is then renamed to TARGETPDFNAME.  ")
+    (* ;; "PSFILE is the name of a closed PS file on a DSK/UNIX device.  This function uses the PDFCONVERTER utility to convert that to a parallel pdf file, which is then renamed to PDFFILE.  ")
 
     (* ;; "DONTDELETE is just for debugging, keeps the /tmp/ files")
 
-    (CL:UNLESS (INFILEP PSTMPFILENAME)
+    (SETQ PSFILE (TRUEFILENAME PSFILE))
+    (SETQ PDFFILE (if PDFFILE
+                      then (TRUEFILENAME PDFFILE)
+                    else (PACKFILENAME 'EXTENSION 'pdf 'BODY PSFILE)))
+    (CL:UNLESS (INFILEP PSFILE)
            (ERROR "NO PS FILE TO CONVERT"))
-    (LET ((PDFTMPFILENAME (PACKFILENAME 'EXTENSION 'pdf 'BODY PSTMPFILENAME))
-          (ERRORFILENAME (PACKFILENAME 'EXTENSION 'error 'BODY PSTMPFILENAME))
+    (LET ((ERRORFILE (PACKFILENAME 'EXTENSION 'error 'BODY PSFILE))
           COMPLETIONCODE)
 
          (* ;; "PROCESS-COMMAND is currently from GITFNS.  Not sure whether ShellCommand in UNIXUTILS is appropriate.")
@@ -197,17 +210,13 @@
          (* ;; "We have to map the filenames down to Unix conventions:  (not host, slashes, etc.")
 
          [SETQ COMPLETIONCODE (PROCESS-COMMAND
-                               (CONCATLIST (SUBLIS `[(PSTMPFILENAME \, (SLASHIT (PACKFILENAME
-                                                                                 'HOST NIL
-                                                                                 'BODY PSTMPFILENAME)
-                                                                              ))
-                                                     (PDFTMPFILENAME \, (SLASHIT (PACKFILENAME
-                                                                                  'HOST NIL
-                                                                                  'BODY 
-                                                                                  PDFTMPFILENAME)))
-                                                     (ERRORFILENAME \, (SLASHIT (PACKFILENAME
-                                                                                 'HOST NIL
-                                                                                 'BODY ERRORFILENAME]
+                               (CONCATLIST (SUBLIS `[(PSFILE \, (SLASHIT (PACKFILENAME 'HOST NIL
+                                                                                'BODY PSFILE)))
+                                                     (PDFFILE \, (SLASHIT (PACKFILENAME 'HOST NIL
+                                                                                 'BODY PDFFILE)))
+                                                     (ERRORFILE \, (SLASHIT (PACKFILENAME
+                                                                             'HOST NIL 'BODY 
+                                                                             ERRORFILE]
                                                   (ASSOC (OR PDFCONVERTER (MKATOM (UNIX-GETENV 
                                                                                 "MEDLEY-PDFCONVERTER"
                                                                                          )))
@@ -215,22 +224,24 @@
 
          (* ;; "Now use Medley names")
 
-         (CLOSEF? PSTMPFILENAME)
-         (CL:UNLESS DONTDELETE (DELFILE PSTMPFILENAME))
-         (CLOSEF? ERRORFILENAME)
-         (CL:WHEN (INFILEP ERRORFILENAME)
-             (CL:WHEN (IGREATERP (PROG1 (GETFILEINFO ERRORFILENAME 'LENGTH)
-                                     (CL:UNLESS DONTDELETE (DELFILE ERRORFILENAME)))
+         (CLOSEF? PSFILE)
+         (CL:UNLESS DONTDELETE (DELFILE PSFILE))
+         (CLOSEF? ERRORFILE)
+         (CL:WHEN (INFILEP ERRORFILE)
+             (CL:WHEN (IGREATERP (PROG1 (GETFILEINFO ERRORFILE 'LENGTH)
+                                     (CL:UNLESS DONTDELETE (DELFILE ERRORFILE)))
                              0)
-                    (ERROR "Cannot create PDF file for " TARGETPDFNAME)))
+                    (ERROR "Cannot create PDF file for " PDFFILE)))
          (CL:WHEN (IGREATERP COMPLETIONCODE 0)
-                (ERROR "Cannot create PDF file for " TARGETPDFNAME))
-         (RENAMEFILE PDFTMPFILENAME TARGETPDFNAME])
+                (ERROR "Cannot create PDF file for " PDFFILE))
+         PDFFILE])
 )
 
+(MOVD? 'CL:IDENTITY 'TRUEFILENAME)
+
 (PDF-INIT)
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (2710 5044 (PDFFILEP 2720 . 3634) (PDF.HARDCOPYW 3636 . 4063) (PDF.TEXT 4065 . 4673) (
-PDF.TEDIT 4675 . 5042)) (5470 12943 (PDF-INIT 5480 . 6205) (OPEN-PDF-STREAM 6207 . 8310) (
-CLOSE-PDF-STREAM 8312 . 9496) (PDF-CONVERT 9498 . 12941)))))
+  (FILEMAP (NIL (2929 5370 (PDFFILEP 2939 . 3853) (PDF.HARDCOPYW 3855 . 4389) (PDF.TEXT 4391 . 4999) (
+PDF.TEDIT 5001 . 5368)) (5718 13064 (PDF-INIT 5728 . 6453) (OPEN-PDF-STREAM 6455 . 8558) (
+CLOSE-PDF-STREAM 8560 . 9864) (PS-TO-PDF 9866 . 13062)))))
 STOP
diff --git a/library/PDFSTREAM.LCOM b/library/PDFSTREAM.LCOM
index dde4ea6f..cba1e2e5 100644
Binary files a/library/PDFSTREAM.LCOM and b/library/PDFSTREAM.LCOM differ
