Post Reply 

file-pdf-load in Windows

Feb 7, 2012, 09:27
Post: #1
file-pdf-load in Windows

Relatively new to GIMP but been playing with it for a couple of days and one thing is really frustrating me. I can't seem to open PDF's in batch mode via a script. JPG's are fine but PDF's just won't load, I always get:
"Execution error for procedure 'gimp-file-load':
Could not convert '1.pdf' to an URI: The pathname '1.pdf' is not an absolute path"

Tried this with file-pdf-load but get exactly the same error. Any ideas? Is this just a limitation of doing this in Windows?

Also, anyone know a way around using full file paths in windows? The \ aren't being picked up.


(define (batch-crop-jpeg)
(let* ((filelist (cadr (file-glob "*.pdf" 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(plug-in-autocrop RUN-NONINTERACTIVE
image drawable)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
Find all posts by this user
Quote this message in a reply
Feb 7, 2012, 12:18
Post: #2
RE: file-pdf-load in Windows
Hi, thanks for this.

That was the issue. I had tried the full file path before but \ didn't seem to be working. Resorted to using / instead and that works. Odd that it seems to work differently for PDF's than JPG's.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Script-fu script to conversion pdf to image 4ever 12 4,442 Jul 17, 2018 16:01
Last Post: paynekj
  Script-fu ordered file list vnicent 1 218 Mar 19, 2018 17:33
Last Post: paynekj
  GAP Plugin error windows 8.1gap_ decode_mplayer.exe entry point not found. thegreenman 1 1,376 Sep 8, 2014 11:55
Last Post: rich2005
Question Load PDF and load images Vash Stampida 2 726 Aug 7, 2014 20:05
Last Post: Vash Stampida
  Windows 8, GIMP 2.8.10, crashes opening files or on new but will open by itself. Coanunn 2 471 Jul 29, 2014 13:57
Last Post: Coanunn

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS