Suggestions for vector pdf creation

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
willroy
Posts: 3
Joined: 2011-09-29T13:24:01-07:00
Authentication code: 8675308

Suggestions for vector pdf creation

Post by willroy »

I know Imagemagick is not the tool for producing vector pdfs but I am wondering if anyone else has faced and overcome this issue, with or without IM.

I produce a 'multi-layered' image in IM by compositing a group of other images (including text). I do this via PHP and the Imagick class. I have currently tried using tcpdf to produce my vector copy of the image, but finding problems with minor differences of how the 2 scripts size and position fonts.

I understand pstoedit offers some vector production features through a plugin for IM but being a PHP developer I can't adapt this well for my project.

Any help appreciated..
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Suggestions for vector pdf creation

Post by anthony »

IM can generate SVG from bitmap images. if the autotrace library was present when IM was built.
Or you can use autotrace directly!

At least for images, not so good for text which requires OCR to generate vector text (this is also part of DjVu scan documents, if you can make any understandign of it - I haven't yet)

SVG can then be converted to vector PDF.


For example of bitmap to SVG vector conversion see..
http://www.imagemagick.org/Usage/transform/#edge_vector
and
http://www.imagemagick.org/Usage/draw/#svg_output

WARNING: if SVG was not available IM generates a dot for every pixel! Arrrgggghhhhh....
I think Morphology distance and skeleton methods, may provide a better solution in this regard!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply