From 0c98dcd10f7126d68a1c900180a98d741f0cff43 Mon Sep 17 00:00:00 2001 From: notfire Date: Tue, 3 Sep 2024 18:58:41 -0400 Subject: [PATCH] add gimp plugin --- plugins/gimp-export-all-open-as-one-pdf.scm | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 plugins/gimp-export-all-open-as-one-pdf.scm diff --git a/plugins/gimp-export-all-open-as-one-pdf.scm b/plugins/gimp-export-all-open-as-one-pdf.scm new file mode 100644 index 0000000..37598a0 --- /dev/null +++ b/plugins/gimp-export-all-open-as-one-pdf.scm @@ -0,0 +1,40 @@ +(define (export-all-open-as-one-pdf) + (let* ( + ;; variables for the program to work + (list_first (car (gimp-image-list))) + (list_second (cadr (gimp-image-list))) + (list_reverse (list->vector (reverse (vector->list list_second)))) + + ;; configurable options (change these): + (inDir "Documents/Scans/sch") ; output file directory + (inFileName "Combined.pdf") ; output file name + + ;; configurable options (these you shouldn't have to change): + (isInteractive FALSE) ; this should never be set to true, otherwise it will not work + (isVector TRUE) ; whether or not you want to convert bitmaps to vectors when possible + (isOmit TRUE) ; whether or not you want to ignore hidden layers + (isMask TRUE) ; whether or not you want to apply layer masks before saving + ) + + (file-pdf-save-multi isInteractive + list_first + list_reverse + isVector + isOmit + isMask + (string-append inDir "/" inFileName) + (string-append inDir "/" inFileName) + ) + ) +) + +(script-fu-register "export-all-open-as-one-pdf" + "Export all as one PDF..." + "Export all opened images at once as a single PDF" + "notfire" + "beep" + "2024/09/03" + "*" +) + +(script-fu-menu-register "export-all-open-as-one-pdf" "/File/Export/")