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 ordered file list vnicent 1 39 Yesterday 17:33
Last Post: paynekj
  GAP Plugin error windows 8.1gap_ decode_mplayer.exe entry point not found. thegreenman 1 1,120 Sep 8, 2014 11:55
Last Post: rich2005
Question Load PDF and load images Vash Stampida 2 606 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 418 Jul 29, 2014 13:57
Last Post: Coanunn
  How to get python module to load? Michael the Narwhal 0 941 Apr 16, 2014 16:49
Last Post: Michael the Narwhal

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS