Re: [Gimp-docs] gimp-docs-list Digest, Vol 72, Issue 1



Unsubscribe

--
Brian Ian Smith
(616) 426-9252
Pronouns: he, him, his
--

On Jan 5, 2019, at 07:00, gimp-docs-list-request gnome org wrote:

Send gimp-docs-list mailing list submissions to
   gimp-docs-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
   https://mail.gnome.org/mailman/listinfo/gimp-docs-list
or, via email, send a message with subject or body 'help' to
   gimp-docs-list-request gnome org

You can reach the person managing the list at
   gimp-docs-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gimp-docs-list digest..."


Today's Topics:

  1.  Example of script that convert in batch PDF to PNG
     (Camille Desmots)


----------------------------------------------------------------------

Message: 1
Date: Wed, 2 Jan 2019 17:37:52 +0100
From: Camille Desmots <camille desmots-ext ac-rennes fr>
To: gimp-docs-list gnome org
Subject: [Gimp-docs] Example of script that convert in batch PDF to
   PNG
Message-ID: <bb97b3d1-35f4-bfce-7b40-e4a0ffad1d85 ac-rennes fr>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi,

I have done a batch job for converting PDF to PNG in batch mode.


         The source of the file "batch-pdf-to-png.scm"

; BEGIN SCRIPT FU ( ?? define (batch-pdf-to-png pattern)( ????? let* ( 
???????? (filelist (cadr (file-glob pattern 1))) ???????? (filename) 
???????? (image) ???????? (drawable) ???????? (fileparts) ???????? 
(pngfilename) ????? ) ????? (gimp-message "Preparing to act on the 
following files") ????? (gimp-message pattern) ????? (while (not (null? 
filelist)) ???????? (set! filename (car filelist)) ???????? 
(gimp-message "The current file is: ") (gimp-message filename) ???????? 
(set! image (car (file-pdf-load RUN-NONINTERACTIVE filename filename))) 
???????? (set! drawable (car (gimp-image-get-active-layer image))) 
???????? (set! fileparts (strbreakup filename ".")) ???????? (set! 
fileparts (butlast fileparts)) ???????? (set! pngfilename (string-append 
(unbreakupstr fileparts ".") ".png")) ???????? (gimp-message "The new 
filename will be: ") ???????? (gimp-message pngfilename) ???????? 
(file-png-save-defaults RUN-NONINTERACTIVE image drawable pngfilename 
pngfilename) ???????? (gimp-image-delete image) ???????? (set! filelist 
(cdr filelist)) ????? ) ?? ) ) ; END SCRIPT FU

Example of command line on Windows (in the same directory as the script):

"C:\Program Files\GIMP 2\bin\gimp-2.8.exe" -i -b "(batch-pdf-to-png 
\"C:\\My\ project\\My\ PDFs\\*.pdf\")" -b "(gimp-quit 0)";

-- 
Cordialement.
Camille Desmots
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.gnome.org/archives/gimp-docs-list/attachments/20190102/70547e89/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: camille_desmots-ext.vcf
Type: text/x-vcard
Size: 372 bytes
Desc: not available
URL: <https://mail.gnome.org/archives/gimp-docs-list/attachments/20190102/70547e89/attachment.vcf>

------------------------------

Subject: Digest Footer

_______________________________________________
gimp-docs-list mailing list
gimp-docs-list gnome org
https://mail.gnome.org/mailman/listinfo/gimp-docs-list


------------------------------

End of gimp-docs-list Digest, Vol 72, Issue 1
*********************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]