From 499e3ab77acc12632875f9c4cc7145eab992b84a Mon Sep 17 00:00:00 2001 From: rmkaplan <69548581+rmkaplan@users.noreply.github.com> Date: Mon, 9 Jun 2025 20:40:16 -0700 Subject: [PATCH] PDFSTREAM opens the scratch stream (#2184) --- library/PDFSTREAM | 20 ++++++++++---------- library/PDFSTREAM.LCOM | Bin 5663 -> 5705 bytes 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/library/PDFSTREAM b/library/PDFSTREAM index 9a4533c2..414efd3d 100644 --- a/library/PDFSTREAM +++ b/library/PDFSTREAM @@ -1,12 +1,12 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "23-Feb-2025 12:18:57" {WMEDLEY}PDFSTREAM.;62 14729 +(FILECREATED " 5-Jun-2025 08:42:11" {WMEDLEY}PDFSTREAM.;64 14885 :EDIT-BY rmk :CHANGES-TO (FNS OPEN-PDF-STREAM) - :PREVIOUS-DATE "25-Dec-2024 14:26:23" {WMEDLEY}PDFSTREAM.;60) + :PREVIOUS-DATE "23-Feb-2025 12:18:57" {WMEDLEY}PDFSTREAM.;62) (PRETTYCOMPRINT PDFSTREAMCOMS) @@ -153,7 +153,8 @@ (DEFINEQ (OPEN-PDF-STREAM - [LAMBDA (FILE OPTIONS) (* ; "Edited 23-Feb-2025 12:18 by rmk") + [LAMBDA (FILE OPTIONS) (* ; "Edited 5-Jun-2025 08:41 by rmk") + (* ; "Edited 23-Feb-2025 12:18 by rmk") (* ; "Edited 23-Sep-2023 15:38 by rmk") (* ; "Edited 22-Sep-2023 11:04 by rmk") (* ; "Edited 24-Jun-2023 14:49 by rmk") @@ -165,8 +166,6 @@ (* ;;  "Simplest thing for now is to just add an extra field at the end of the \POSTSCRIPTDATA record.") - (* ;; "") - (if [AND NIL (EQ 'LPT (FILENAMEFIELD FILE 'HOST] then (* ;; "If FILE is on the LPT device, we could just ssume that it can be printed directly, no point in converting. But then we would alo have to lie and give it a PDF extension so it thinks that we are heading to a PDF printer.") @@ -178,8 +177,9 @@ (* ;; "Device NULL used by TMAX, maybe others, to get page number for table of contents, index. Nothing to convert") (OPENPOSTSCRIPTSTREAM FILE OPTIONS) - elseif (SETQ FILE (OR (AND (NEQ FILE T) - (OUTFILEP FILE)) + elseif (SETQ FILE (OR [AND (NEQ FILE T) + (OR (OUTFILEP FILE) + (OPENSTREAM FILE 'OUTPUT] (ERROR "PDF target file not found" FILE))) then (CL:UNLESS (ASSOC (PDFCONVERTER) PDF-CONVERTER-TEMPLATES) @@ -293,7 +293,7 @@ ) (DECLARE%: DONTCOPY (FILEMAP (NIL (3263 5877 (PDFFILEP 3273 . 4187) (PDF.HARDCOPYW 4189 . 4787) (PDF.TEXT 4789 . 5506) ( -PDF.TEDIT 5508 . 5875)) (6317 13806 (OPEN-PDF-STREAM 6327 . 8892) (CLOSE-PDF-STREAM 8894 . 10181) ( -PS-TO-PDF 10183 . 13804)) (13807 14371 (SEE-PDF 13817 . 14369)) (14422 14706 (PDFCONVERTER 14432 . -14704))))) +PDF.TEDIT 5508 . 5875)) (6317 13962 (OPEN-PDF-STREAM 6327 . 9048) (CLOSE-PDF-STREAM 9050 . 10337) ( +PS-TO-PDF 10339 . 13960)) (13963 14527 (SEE-PDF 13973 . 14525)) (14578 14862 (PDFCONVERTER 14588 . +14860))))) STOP diff --git a/library/PDFSTREAM.LCOM b/library/PDFSTREAM.LCOM index 69a0da4518793beec9df304f37faadce5ec5db6b..7d4e4dbe68f42494f7dc97edf6501c961d913022 100644 GIT binary patch delta 491 zcmZvY!D|yi6vo|3yO@KtAQS__$3RO9*|2XjyV>1Sx5=zV(w${8(TkVbgfyg$!784_ zThEp8(vzMUaq0zr5WOnrP7myDy;m?ZD+A9><}1bD=v$E^Tl-r7L^l zE->OgvfR2|DTv9ex=)EGkbPbDH3A>Sf+zWSA$!__vJn%o`s{?+qCI&GNn)g1U5aBf OacfHv&ClJ_$NvD)NP0m4 delta 410 zcmZvWJxjw-6o!eVEp`w@Q5WHmK`b`uy|?*jf_K9Tc3-Iq!4M`<}PbsC2W-N7BNutFDnE6l82EUeZ`m_@FQFzZQmEEUbEdgVq^!BI@#c$;<)P zOk(kUX=6@T+~jZ)stM61hD|EN0Z3^4EA{k^{5D^j(#-Ko{(9yUiT-T^