PDF links -> SVG
Submitted by rdt..@..il.com
Assigned to poppler-bugs
Description
I'm using pdf2svg from http://www.cityinthesky.co.uk/opensource/pdf2svg/ toconvert PDF pages to SVG images. The key steps are as follows:
// Open the SVG file
surface = cairo_svg_surface_create(svgFilename, width, height);
drawcontext = cairo_create(surface);
// Render the PDF file into the SVG file
poppler_page_render(page, drawcontext);
cairo_show_page(drawcontext);
For my purposes, this works well, with one exception: clickable links in the PDF page are not converted into links in the SVG image.
SVG supports simple xlinks and cairo has a function cairo_surface_set_mime_data with CAIRO_MIME_TYPE_URI as a supported mime type. I believe links on a PDF page are available using poppler_page_get_link_mapping.
Seems like this would be a useful enhancement to poppler_page_render for an svg_surface.