segmentation fault during poppler_page_render()

Dan Raymond <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Is there something wrong with the following code snippet?  I am getting 
intermittent segmentation faults during poppler_page_render().


    // Paint the drawing area grey and then fill the PDF rendering area 
with white.  This will
    // prevent the background from bleeding through any areas that are 
not rendered by the PDF.

    surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 
window_width, window_height);
    cr = cairo_create(surface);
    cairo_set_source_rgb(cr, 0.33, 0.33, 0.33);  // grey background
    cairo_paint(cr);
    cairo_rectangle(cr, x_padding, y_padding, pdf_width, pdf_height);
    cairo_set_source_rgb(cr, 1, 1, 1);
    cairo_fill(cr);

    // Render the PDF.

    cairo_translate(cr, x_padding, y_padding);
    cairo_scale(cr, scale_factor, scale_factor);
    poppler_page_render(page, cr);
    cairo_destroy(cr);
    // (use the rendered surface here)
    cairo_surface_destroy(surface);

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.