diff --git a/src/image_util.cpp b/src/image_util.cpp index 35ccb4ba1..dfc1c54c6 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -375,6 +375,7 @@ void save_to_cairo_file(mapnik::Map const& map, { #if defined(CAIRO_HAS_PDF_SURFACE) surface = Cairo::PdfSurface::create(filename,width,height); +#else throw ImageWriterException("PDFSurface not supported in the cairo backend"); #endif }