Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#44200 - [mapnik] Export to PDF fails
Attached to Project:
Community Packages
Opened by Roel (roelpaddestoel) - Sunday, 15 March 2015, 20:55 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 23 March 2015, 11:40 GMT
Opened by Roel (roelpaddestoel) - Sunday, 15 March 2015, 20:55 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 23 March 2015, 11:40 GMT
|
DetailsDescription:
When trying to render a map in python, I get the following error: File "./hikingmap.py", line 254, in render_map mapnik.render_to_file(m, filename, 'pdf') RuntimeError: Cairo backend not available, cannot write to format: pdf The error happens only when rendering to pdf, ps or svg, jpeg and png work fine. The following piece of code is an excerpt from mapnik_python.cpp, line 489-496: else if (format == "pdf" || format == "svg" || format =="ps" || format == "ARGB32" || format == "RGB24") { #if defined(HAVE_CAIRO) mapnik::save_to_cairo_file(map,filename,format,1.0); #else throw mapnik::ImageWriterException("Cairo backend not available, cannot write to format: " + format); #endif } This suggest that HAVE_CAIRO was not defined at compile time for some reason. I suppose the answer can be found in the build log, which I am unable to find on the archlinux website. Additional info: * version: mapnik-2.2.0.654.g718a8b3-1 Reproducing this bug is not that easy as it requires a complete setup, but calling mapnik.render_to_file in python with 'pdf' as third parameter should do the trick. |
This task depends upon
it say that cairo found and -DHAVE_CAIRO is present in build log