You are not logged in.

#1 2008-02-06 11:54:09

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

How to grab part of pdf to vector image?

Is it possible to select an area in a pdf document and save it as vector image file like eps or something that I can insert into openoffice document and will look nice when printed on paper?

Kpdf saves only to png and jpeg files which look terrible.
ghostscript and tetex packages have some pdf and ps utilities, but none seems to do this.

Offline

#2 2008-02-06 16:05:34

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to grab part of pdf to vector image?

It may not be what you're looking for, but GIMP can open PDF files. You may be able to get a high quality image out of that.

Offline

#3 2008-02-06 16:12:45

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: How to grab part of pdf to vector image?

Maybe pdfedit can do this. Not tested.

Offline

#4 2008-02-07 11:28:05

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: How to grab part of pdf to vector image?

How do you open a pdf with gimp? It says "Unknown file type" when I try to open a pdf. Do I need some special plugin for this?

pacman -Q | grep gimp
gimp 2.4.3-1
gimp-help-2 2.4.0-1

And pdfedit saves only raster images.

Offline

#5 2008-02-07 12:23:32

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: How to grab part of pdf to vector image?

I've never tried. I imagine pdf2eps might be a good starting point as I imagine more vector tools would know how to deal with eps than PDF.

Are the images too complex to recreate in a vector program yourself? This is what I have done a few times.

Offline

#6 2008-02-07 12:51:55

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to grab part of pdf to vector image?

mico wrote:

How do you open a pdf with gimp? It says "Unknown file type" when I try to open a pdf. Do I need some special plugin for this?

I've been able to open PDF's in GIMP for a long time just through the standard open mechanism. I'm not sure what's letting it work. I thought it was ghostscript, but you already have that. It may be poppler. Or the combination of the two,

Offline

#7 2008-02-07 23:10:47

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: How to grab part of pdf to vector image?

I think this task is not possible without a trace program. Everything you can get out of an PDF by some cut and paste like mechanism but be a bitmap.

Offline

#8 2008-02-07 23:12:29

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: How to grab part of pdf to vector image?

pdfedit doesn't do this, but it will save an image that is scaled to whatever size you're zooming.  It's not perfect, but you can fake it.  It's very good at copying, say, a table from a pdf for some presentation.


Cthulhu For President!

Offline

#9 2008-02-08 08:43:29

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: How to grab part of pdf to vector image?

OK, thanks, at least I know this can't be done at all.

I used some older drawings I made that I *could* modify and print to file. Then I used "pstoedit -f idraw" to change PS to EPS and included that in openoffice text document. I couldn't change the aspect ratio to cut out blank area (it is set to paper size), so I simply cropped the image in OpenOffice and everything is perfect.

Offline

#10 2008-02-09 05:11:46

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to grab part of pdf to vector image?

Sorry to bump, but I don't understand why I can open PDF files in GIMP and others can't. If I set the parameters correctly (Coloring: Automatic; Text antialiasing: Strong; Graphics anitaliasing: Strong), I can get a near perfect PNG copy of a PDF file. mico, if you or anyone else that can't open PDF files feels like trying to open GIMP from the command line first then trying to open a PDF, I wonder if there will be any useful error messages?

Last edited by skottish (2008-02-09 05:16:46)

Offline

#11 2008-02-09 06:34:31

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: How to grab part of pdf to vector image?

I had to install poppler-glib.

$ gimp a.pdf
/usr/lib/gimp/2.0/plug-ins/poppler: error while loading shared libraries: libpoppler-glib.so.2: cannot open shared object file: No such file or directory

(gimp:9600): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
[mitjav@pundit tmp]$ gimp
/usr/lib/gimp/2.0/plug-ins/poppler: error while loading shared libraries: libpoppler-glib.so.2: cannot open shared object file: No such file or directory

(gimp:9604): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
# pacman -S poppler-glib

Now gimp can open it, but it transforms it into raster image first, so it is no different than kpdf and other tools.

Offline

#12 2008-02-09 06:58:34

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to grab part of pdf to vector image?

Thanks mico. This didn't work for you, and I don't know how to do the transform back to what you originally asked about. I was hoping that the ability to get high quality images would at least allow you to produce the output that you wanted. Sorry it didn't work out.

The only other thing I can think of is to copy and paste. KWord can parse PDF files, but the last time I checked it's not so great. KPDF will allow copy and paste into other applications...

Offline

#13 2008-02-18 15:28:12

ST.x
Member
From: Sydney, Australia
Registered: 2008-01-25
Posts: 363
Website

Re: How to grab part of pdf to vector image?

I installed pdfedit but when i run i get;
$ pdfedit
pdfedit: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory

Offline

#14 2008-02-18 16:44:13

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: How to grab part of pdf to vector image?

ST.x wrote:

I installed pdfedit but when i run i get;
$ pdfedit
pdfedit: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory

Maybe it nedds a rebuild due to the recent changes with qt which is qt4 now.

Offline

#15 2008-02-18 21:08:55

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: How to grab part of pdf to vector image?

You can convert raster images to vector using this:

http://vectormagic.stanford.edu/

It works well with simple images.

Offline

#16 2009-06-29 15:23:05

laubblatt
Member
Registered: 2009-06-29
Posts: 1

Re: How to grab part of pdf to vector image?

If have had the same Problem,
how to extract a part of a pdf page, e.g. a grahic.

I found this solution using ghostscript:

http://www.ghostscript.com/pipermail/gs … 08455.html

So you might want to try something like this:

 gs -g4000x2300 -sOUTPUTFILE=./output.pdf -sDEVICE=pdfwrite -dBATCH -c "<< /PageOffset [-100 -480] >> setpagedevice" -f input.pdf

Offline

#17 2009-06-29 18:26:02

fifafrazer
Member
Registered: 2008-02-18
Posts: 81

Re: How to grab part of pdf to vector image?

Inkscape is able to open and edit pdf pages

Offline

#18 2009-06-29 18:27:27

IceHand
Member
From: Germany
Registered: 2007-05-06
Posts: 53
Website

Re: How to grab part of pdf to vector image?

Inkscape can import a PDF file as a vector image.

Offline

#19 2009-07-08 11:05:32

v33
Member
Registered: 2009-07-08
Posts: 1

Re: How to grab part of pdf to vector image?

i was looking for a solution to grab a linked eps file from an acrobat document and chanced upon this site, after reading through all the post here i thought of a solution to the problem. unfortunately, i am not a linux user ... please be nice. smile

here is what i did and it worked ...

1. you need to open the document in adobe acrobat (not the reader)
2. go to the page where the graphic resides
3. export the page as eps
4. open it in adobe illustrator (tested) or some other vector app (untested)
5. select the graphic and copy paste it to a blank document
6. save it in any format you want (ofcourse it will depend on what application your using).

thats it! worked for me, i got the logo to use on an ad campaign for a danish company that sells the product.

hth!

Offline

Board footer

Powered by FluxBB