Post Reply 

Load PDF and load images

Aug 7, 2014, 16:30
Post: #1
Question Load PDF and load images
Hi

I want that help me with two problems

How can I open all pages of PDF file in Gimp with Python-fu?, I've found
pdb.file_pdf_load but I don't know how to use Dodgy I've searched information however I do not understand because not work for me, please help me I could tell me how to use

How can I open all images of a directory in Gimp, only I want open all images, with python--fu

Best regards
Find all posts by this user
Quote this message in a reply
Aug 7, 2014, 18:18
Post: #2
RE: Load PDF and load images
(Aug 7, 2014 17:03)ofnuts Wrote:  1) seems it loads only the first page:
Code:
image = pdb.file_pdf_load('/path/to/the/file.pdf','/path/to/the/file.pdf')
display=gimp.Display(image)

... and is also missing all the useful options of the interactive version (print definition, etc...)

2) use the glob.glob() function (import the "glob" module) to obtain a list of files in the directory and then feed them one by one to the relevant file-load functions.

thank you for response

1) yes, only has loaded the first page Confused
how can I load all pages?

2) I did not know this "gimp_display_new" therefore was not working
Find all posts by this user
Quote this message in a reply
Aug 7, 2014, 20:05
Post: #3
RE: Load PDF and load images
(Aug 7, 2014 19:14)ofnuts Wrote:  Maybe use some external PDF processor to split the PDF into invidual page files. This one looks good (but I didn't try it). There are also online sites.

In python, best use pythonic code when you can.

Code:
display=gimp.Display(image)

is more readable and does exactly the same thing as:

Code:
display=pdb.gimp_display_new(image)

1) I will use ghostscript, I wanted know If I could do it with gimp
2) thank for your suggestion

thank you for all Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  creating multiple sized images from one ntuck86 1 130 Jul 29, 2017 08:18
Last Post: ythgilb
  Batch create images from array edmilner 1 206 Jul 17, 2017 16:41
Last Post: ythgilb
Question Wanting to find / create a script which stitches images together PantsOnFire 2 386 Aug 12, 2014 22:45
Last Post: fluffybunny2
  How to get python module to load? Michael the Narwhal 1 589 Apr 16, 2014 17:05
Last Post: ofnuts
  Batch conversion of PDF file ? eljay 7 6,145 Oct 21, 2013 10:20
Last Post: almien

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS