Issue with createGlyphVector when converting to image

2012-04-02 Thread Hamed Iravanchi
Hi, I'm trying to fix issues introduced by using glyphs instead of extracted text when creating images from PDF. So far, I could figure out for the TrueTypeFonts which include a CMAP, using the "char" overload of createGlyphVector (with code points directly converted to character) works fine. Like

Re: Extracting vector graphics from PDF

2012-04-02 Thread Peter Murray-Rust
On Mon, Apr 2, 2012 at 2:51 PM, Andrey Kuznetsov wrote: > Peter, you have to pass your own Graphics2D object (with some overridden > methods) to pdfbox. > > Something like > > MyGraphics2D extends Graphics2D { > > public void fill(Shape s) { >//extract shape here - don’t forget to apply a

AW: Extracting vector graphics from PDF

2012-04-02 Thread Andrey Kuznetsov
Peter, you have to pass your own Graphics2D object (with some overridden methods) to pdfbox. Something like MyGraphics2D extends Graphics2D { public void fill(Shape s) { //extract shape here - don’t forget to apply affine transform } } Andrey -Ursprüngliche Nachricht- Von: p

Re: Extracting vector graphics from PDF

2012-04-02 Thread Peter Murray-Rust
On Mon, Apr 2, 2012 at 1:14 PM, Andrey Kuznetsov wrote: > Forget hacking into the stream. > Hack into Graphics2D - this is much easier and will give you shape in right > size and transform. > Many Thanks Andrey, I did something like that before and got a separate graphics stream which I was abl

AW: Extracting vector graphics from PDF

2012-04-02 Thread Andrey Kuznetsov
Forget hacking into the stream. Hack into Graphics2D - this is much easier and will give you shape in right size and transform. Andrey -Ursprüngliche Nachricht- Von: peter.murray.r...@googlemail.com [mailto:peter.murray.r...@googlemail.com] Im Auftrag von Peter Murray-Rust Gesendet: Mont

Extracting vector graphics from PDF

2012-04-02 Thread Peter Murray-Rust
I and others are interested in extracting Vector graphics from PDF, perhaps into SVG. I hacked at this about 4 years ago with moderate progress and now need to revisit. I noticed a discussion http://mail-archives.apache.org/mod_mbox/pdfbox-users/200902.mbox/%3CCOL119-W63EED17C9749CDA011AEFEF1C20%40