extract images from pdf

General discussions about Inkscape.
user
Posts: 45
Joined: Mon Oct 25, 2010 7:18 am

extract images from pdf

Postby user » Mon Oct 25, 2010 7:20 am

hello

i need to take a screenshot of a pdf file
i think this is the only way to extract non-text data (if not correct me)

but i need the screenshot in good quality, so it must be taken in specific dpi

if i zoom so much the pdf to reach the specific dpi, it will be hard to take the screenshot, because the margins of the area to be screenshotd will be out of the screen

there is a pdf editor that lets you specify the margins (with the usual drag rectangular tool) and then asks you in which dpi you want the screenshot

then it automatically zooms, takes the screenshot and restores zoom and saves the screenshot

does anyone know this tool or any better? or any other way?

thanks

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: extract images from pdf

Postby brynn » Mon Oct 25, 2010 9:33 am

Welcome to our forums, user!

Well, I don't have loads of experience with PDFs, but wouldn't it be the same process as taking an image from a webpage? IE - right click, Save picture as? I don't have a PDF handy to experiment with, but the PDF context menu (right-click) might have different options that the same from a web browser, I'm guessing.

Here, give me a moment to track down a PDF to experiment with, and I'll have more info to share....

Edit
Ok, I've found 2 PDFs in my files (new computer, otherwise I'd have many more). In both cases, I selected an image, right-click, the only option available is "Copy image".

So I would say, just give it a try. BUT please be sure that there is not a copyright!

Regarding resolution, it's just going to depend on the image. If the image is a low resolution, I don't think there's any way to give it more resolution. Although I certainly could be wrong about that. I could be wrong about this too, but I think zooming would decrease the resolution, not increase it???

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: extract images from pdf

Postby tomh » Mon Oct 25, 2010 8:59 pm

Have you tried importing the PDF into Inkscape?

Inkscape has a PDF import process and it can also import the bitmap data from the PDF without having to take screen-shots.

The method that I use when importing a figure from a PDF for a report is this:
1)find page in a PDF reader with the image that I want to import
2)open a blank document in Inkscape, go file->open. Select the PDF file, and then the page
3)once in Inscape, select the image/section you want, copy and paste into a new Inkscape document. Add the refrence to image that I will use later off canvus. Save

user
Posts: 45
Joined: Mon Oct 25, 2010 7:18 am

Re: extract images from pdf

Postby user » Tue Oct 26, 2010 2:45 am

unfortunately I dont find in your answer a way to do what I want

remember that images in pdf files are sometimes embeded and cannot be extracted

so I need to specify an area of the pdf and crop it
but i need to do so in a high resolution (but without zooming the document, because it wont be easy to specify the borders of the cropped area)

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: extract images from pdf

Postby druban » Tue Oct 26, 2010 4:46 pm

Pdf images should always be embedded, that is, I understand the whole point of the format that it is entirely self contained...
The pdf should open in inkscape - try open with. if not then import it, select the image you want, select inverse, and delete. now you should have just the image, to save in whatever format you want.

Oops i should add for a multipage pdf you need to extract the page with your image first before going to inkscape - I use PDF sam (spllit and merge).
Your mind is what you think it is.

user
Posts: 45
Joined: Mon Oct 25, 2010 7:18 am

Re: extract images from pdf

Postby user » Wed Oct 27, 2010 3:19 am

ok i know how to import a pdf to inkscape, the question is how to crop (or somehow identify the borders of) the image i want and then save it in the resolution i want (600dpi)

thanks

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: extract images from pdf

Postby tomh » Wed Oct 27, 2010 6:19 am

user wrote:ok i know how to import a pdf to inkscape, the question is how to crop (or somehow identify the borders of) the image i want and then save it in the resolution i want (600dpi)

thanks


The quick and dirty way of doing this:
1) draw a rectangle the size you need over the top of what you want to extract
2) remove its fill and stroke, keep it selected
3) File-> Export Bitmap, ensure the "selection" option along the top is highlighted; select the dpi under Bitmap size and export

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: extract images from pdf

Postby dvlierop » Sat Oct 30, 2010 11:12 pm

You can use the GIMP for this. Inkscape is good at vectors, but you told us that you're only interested in bitmaps, so you might consider using the GIMP instead. I've done this before and it works marvelously! The GIMP will show you previews of each of the pages, and you can specify the resolution in DPI or in pixels. This is the easiest way I know of to get high resolution bitmaps from a PDF.

user
Posts: 45
Joined: Mon Oct 25, 2010 7:18 am

Re: extract images from pdf

Postby user » Sun Oct 31, 2010 3:00 am

thanks
indeed i told you that i am interested in bitmaps, but is there any chance i can extract vectors from pdf ??

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: extract images from pdf

Postby dvlierop » Tue Nov 02, 2010 5:35 am

Yes you can. If a pdf contains both bitmaps and vectors, then Inkscape will extract them both when importing the file. The vectors should stay vectors, and the same holds for the bitmaps. The GIMP however will convert everything to a single large bitmap.

3galarm
Posts: 1
Joined: Thu Nov 04, 2010 3:03 pm

Re: extract images from pdf

Postby 3galarm » Thu Nov 04, 2010 3:09 pm

if you have windows 7 you can take a screen shot with the snapping tool

becofuan
Posts: 1
Joined: Tue Aug 25, 2015 6:19 pm

Re: extract images from pdf

Postby becofuan » Fri Aug 28, 2015 4:20 pm

Why not refer to some PDF image extraction guide? It will more easily to help you with this issue.


Return to “General Discussions”