]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
printing on osx
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 18 Jun 2025 12:55:32 +0000 (14:55 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 18 Jun 2025 12:55:32 +0000 (14:55 +0200)
* bba.org: use ghostscript to generate pdf and open it in default app
because Sonoma lost ability to directly print postscript.

bba.org

diff --git a/bba.org b/bba.org
index b2e1349cd641e8a2e21e48ff20c461220696b01d..b86e6ce78b68155f8de241de7f8b9d2e1297c29b 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -172,7 +172,22 @@ from bash.
             (push "/opt/local/share/info" Info-directory-list)))
 #+END_SRC
 
+* print on osx
+[2025-06-18 Wed 14:44]
 
+#+begin_src sh :tangle ~/bin/lpr-ps
+  #!/bin/bash
+  uuid=$(uuidgen)
+  gs -sDEVICE=pdfwrite -o $TMPDIR/$uuid.pdf - && open $TMPDIR/$uuid.pdf && sleep 1 && rm $TMPDIR/$uuid.pdf
+#+end_src
+
+#+begin_src emacs-lisp
+  (if (string-equal system-type "darwin")
+      (if (file-exists-p "~/bin/lpr-ps")
+            (setq ps-lpr-command "~/bin/lpr-ps")
+          )
+      )
+#+end_src
 * testing steampipe
 [2023-04-05 Wed 13:18]