GIMP Chat
http://gimpchat.com/

Reading multiple paged PDF - extracting images from
http://gimpchat.com/viewtopic.php?f=8&t=18642
Page 1 of 2

Author:  eagertolearn [ Thu Aug 06, 2020 1:17 pm ]
Post subject:  Reading multiple paged PDF - extracting images from

GIMP Version: 2.8.14
Operating System: Windows
OS Version: 10
GIMP Experience: Basic Level

List any relevant plug-ins or scripts:
Hi All,

I hope you’re doing well under these trying circumstances.

I was emailed a PDF of 17 pages from a trusted source.

There are images from this historic file I’d like to “extract out” from certain pages.

I opened the PDF in GIMP but I’m not sure how I can view each page one at a time as I just see page one on screen.

Is there a page through option in GIMP?

How would you suggest I best extract any of the figures in any of the PDF pages full of other images I don’t want?

Thank you!




Author:  Nidhogg [ Thu Aug 06, 2020 1:34 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

You can open all the pages, or page range as layers or images.

Attachment:
pdf-import.jpg
pdf-import.jpg [ 126.77 KiB | Viewed 4052 times ]


If you need to extract a single image or images from a catalogue, book etc. where they might be placed under text blocks or other elements, you should use pdf editor. Gimp can't separate the pdf elements within a page, it imports the whole page as one image/layer.

Note. Usually images embedded in pdf documents are low quality and compressed, to keep the pdf size small.

Author:  rich2005 [ Thu Aug 06, 2020 1:52 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

As above but import with resolution set to 300 pixels/in

Gimp will always initially set the resolution to 100 ppi.

Then you should be able to rectangular select / copy /paste as a new image.

Author:  Tas_mania [ Thu Aug 06, 2020 5:32 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I use Screenshot screengrabber on my Xubuntu system. It's taking an image of what you are looking at. Resolution is good and easy to use.

Author:  eagertolearn [ Fri Aug 07, 2020 10:07 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Thanks all.

So, if I want to read each "page" in a pdf what are the steps involved in reading each page with layers in GIMP?

Can I simply click the Layer tab and view page one and then click Layer again and choose Next Layer as the next page to read page 2 and so on?

I don't have a PDF editor so once I get each page viewed in GIMP my thoughts was to use Select >Rectangular and the draw a box around the figure I wanted on the page and save that figure as a separate jpg as I need to then import that jpg into a free video editor.

Otherwise, I guess I could open the PDF in Libre Writer or Adobe Reader and then use the Windows 10 Snipping Tool to capture just that figure and save that figure as a .jp file.

Thanks for the brainstorming.

Author:  eagertolearn [ Fri Aug 07, 2020 10:36 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I've attached a cop[y of the quote I'd like to import into the video editor. It can only be imported as a .jpg or .png, not a .pdf.

I want the background to be black and the "lettering" to be a dark mint green.

I'm trying to recall how that's done in GIMP?

I chose Edit > Fill with BG Color and the color chart displays and it placed the cursor over what seems to be black in the color chart but when I return to the quote the "words" are then missing and it's still got a white background. I tried the same steps for the FG color but again I just lose the "words"

I must be missing steps but I don ;t use GIMP daily so it's easy to miss a step or 2 in a process.

Thank you.

Attachments:
Gardening Quote.jpg
Gardening Quote.jpg [ 56.21 KiB | Viewed 3941 times ]

Author:  rich2005 [ Fri Aug 07, 2020 11:49 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Might help you.

My way for both the pdf and the text colour questions. edit: well that was a waste of my time
duration not quite 3 minutes.

Author:  eagertolearn [ Fri Aug 07, 2020 1:11 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Hi rich 2005, Thank you for the video. Its goes very fast and I'm trying to see in 380p (not clear 1080p) after choosing the Color (tab) I don't see in the drop down menu where you choose Remove Background Color (that's not listed in my GIMP) so what option do you choose in that drop-down menu and what's above and below it so I can look for where it should be? I'm stuck at that point.

Author:  rich2005 [ Fri Aug 07, 2020 1:34 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Ok. Your first post says Gimp 2.8.14 I hope you have sometime updated to maybe 2.10.14 (or better 2.10.20)
The video is 1280x720 you should try and view as such, however.

The image you posted is a jpeg. JPEG do not support transparency, so

Add transparency: Layer -> Transparency -> Add Alpha Channel
Now you can remove the white background Colors -> Color to Alpha The default is white, no need to change, just OK it.

Then to change the colour of the text, many ways,

Instead of the Gimp 2.10 colorize you might try
Layer -> Transparency -> Alpha to Selection That correctly selects the text. Then:
Bucket fill the selection with your green color. Then Select -> None.
Put a black layer underneath and merge down.

Author:  Nidhogg [ Fri Aug 07, 2020 1:47 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

eagertolearn wrote:
Thanks all.

So, if I want to read each "page" in a pdf what are the steps involved in reading each page with layers in GIMP?

Can I simply click the Layer tab and view page one and then click Layer again and choose Next Layer as the next page to read page 2 and so on?

Yes, for this I use a script called "cycle-layer-visibility.scm" (attached)
Create shortcuts for it first, Edit/Preferences/Interface/configure keyboard shortcuts.

Then you can switch easily to previous and next layers, and top or bottom layer using your shortcuts.
If you keep the previous or next keyboard shortcut pressed down, the effect is similar to filters/animation/playback on the canvas.
I think it was originally written for short animation preview and sprite work etc.

Attachment:
cycle-layer-visibility.jpg
cycle-layer-visibility.jpg [ 213.41 KiB | Viewed 3918 times ]


Attachments:
cycle-layer-visibility_0.scm [2.9 KiB]
Downloaded 86 times

Author:  eagertolearn [ Fri Aug 07, 2020 1:56 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Ah, that explains why I don't see that option. Must I download the attached file to a specific GIMP folder? And then must I "install" it by clicking on an .exe file in this attachment? Thank you for sharing that and for all your help.

Author:  Nidhogg [ Fri Aug 07, 2020 2:19 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

eagertolearn wrote:
I've attached a cop[y of the quote I'd like to import into the video editor. It can only be imported as a .jpg or .png, not a .pdf.

I want the background to be black and the "lettering" to be a dark mint green.

I'm trying to recall how that's done in GIMP.

Create new image. Paint it with black. Write the text with text tool using mint green, export as png or jpg.
If you have lot of text then you might want to take another approach, but I wouldn't.

The script I attached, if you asked about it is .scm script and goes in the scripts folder, inside your Gimp user folder. No installing involved.

Author:  eagertolearn [ Fri Aug 07, 2020 2:28 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I don't seem to have a scripts folder. I have 32, bin, etc. lib, share, uninst.
I downloaded that attached file outside of all these folders but Gimp doesn't display a choice for Add a New layer.

Author:  eagertolearn [ Fri Aug 07, 2020 3:41 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I visited Edit> Preferences >Interface and I see Keyboard shortcut which are all disabled.

Which ones must I enable to make your attachment work so I can make the background black?

The Colorization still won't keep green even though I changed it to green and press OK.

Thanks.

Author:  eagertolearn [ Fri Aug 07, 2020 3:50 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Hi rich,

I don't use GIMP daily so could you please share the precise steps in this process?

Where and how do I "bucket fill"?

Where and How Do I Put a black layer underneath and merge down?

Thanks.

Instead of the Gimp 2.10 colorize you might try
Layer -> Transparency -> Alpha to Selection That correctly selects the text. Then:
Bucket fill the selection with your green color. Then Select -> None.
Put a black layer underneath and merge down.

Author:  eagertolearn [ Fri Aug 07, 2020 4:00 pm ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Hi rich,

Gliding my mouse over every icon I see a Bucket fill icon next to the Cap Letter A (fill in text) but when I click that on I don't see any color choices. How would I find the color green at this point?

Thanks.

Author:  Nidhogg [ Sat Aug 08, 2020 1:17 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

eagertolearn wrote:
I don't seem to have a scripts folder. I have 32, bin, etc. lib, share, uninst.
I downloaded that attached file outside of all these folders but Gimp doesn't display a choice for Add a New layer.

Gimp user folder isn't in C:/Program Files, it's in the user folder.
Make sure "show hidden folders" is on, or you won't find it.
Browse to C:/Users/*yourname*AppData/Roaming/GIMP/2.10/. This is your user folder,
where you add all the custom resources, palettes, gradients, etc.

There is no separate color picker for the bucket fill or any other tool.
Foreground color is used, click the foreground/background color button to set the desired color.

You can also set the background color of new images from white to black in the preferences if you wish it to be black.

New Layer = Shift+Ctrl+N. Or use the Layer menu.

Read the online Gimp Manual, to learn the basics. Have a nice weekend :bigthup

Author:  eagertolearn [ Sat Aug 08, 2020 8:22 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I'm on deadline so if anyone who's used the bucket tool could please share the steps after one clicks on the bucket tool icon? I don't see a foreground/background icon or the words anywhere in that feature. I've clicked on the bucket tool icon and I see Mode - Normal - Opacity - Threshold but nothing indicating it would change the foreground ("lettering") from white to dark mint green.

I then visited Edit (tab) > Preferences but I don't see anything about changing the background color to black.

I'd very much appreciate if anyone could please help me fill in all those intervening steps.

Thank you.

Author:  eagertolearn [ Sat Aug 08, 2020 8:33 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

I just pressed Ctrl+Shift+N and reached a Layer menu box. I pressed Foreground but up top there seems to be only a few colors, not a color chart choice. I clicked the olive green but it just made the "lettering" all dark so it couldn't be seen. I undid that and clicked on the background option and clicked the black icon in the color selection but that just blacked all out.

I'm not sure how to proceed under the Layer option?

Thank you.

Author:  eagertolearn [ Sat Aug 08, 2020 9:36 am ]
Post subject:  Re: Reading multiple paged PDF - extracting images from

Hi Nidhogg, Would I place the GIMP user manual (file = gimp-help 2.10 en-setup) in the folder as well?

Thank you

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/