Hi,
I noticed that one of the SoC'ers is working on integrating libpoppler with Inkscape for PDF import - I have investigated this briefly and written a quick-and-actually-not-too-dirty PDF to SVG converter with libpoppler and cairo. It is available at http://seis.bris.ac.uk/~db9052/pdf2svg.tgz.
It is a *very* simple program that opens a PDF file with poppler and renders it to a cairo surface that is connected to an SVG file. Very simple and very effective and you might want to think about integrating it with Inkscape as is. It has worked on everything I've tried it on, though it has the nasty habbit of slicing large bitmaps up into small chunks. It doesn't produce the most streamlined SVG files either...
Try it out and let me know.
Dave
Hi Dave,
Thanks for your post.
On 5/24/07, Dave Barton <davebarton@...1739...> wrote:
It is a *very* simple program that opens a PDF file with poppler and renders it to a cairo surface that is connected to an SVG file. Very simple and very effective and you might want to think about integrating it with Inkscape as is. It has worked on everything I've tried it on, though it has the nasty habbit of slicing large bitmaps up into small chunks. It doesn't produce the most streamlined SVG files either...
While preparing my application for GSoC I also tested this approach but I wasn't satisfied with the results. One of the reasons why this import method wouldn't be appropriate for Inkscape has been mentioned by you: it doesn't really produce a streamlined SVG file from which editing would be easy (though it is better than nothing). For example, to ease the editing of an imported document layers could be extracted from a PDF which cannot be done via this method. The other "bad point" of the poppler-cairo-svg approach is that it cannot import gradients at all since libpoppler converts them explicitly to an approximation of the original gradient using small colored rectangles. This is why creating the PDF import extension will include tweaking libpoppler a lot.
Best regards, miklos
participants (2)
-
Dave Barton
-
Miklós Erdélyi