[cairo] print text to a PostScript (PS) file using Cairo

Evan Martin martine at danga.com
Wed Oct 26 07:46:49 PDT 2005


On 10/25/05, rush ta <anjutagtk at gmail.com> wrote:
> hi guys...
>
>  I m trying to print text to a PostScript (PS) file using Cairo...
>
>  I get the prog to complie and run with out errors...
>
>  But the PS file obtained doesnot contain any text ...
[snip]
>      surface = cairo_ps_surface_create (FILENAME,
>                         X_INCHES * 72.0,
>                         Y_INCHES * 72.0);
>
>      cr = cairo_create (surface);
>      cairo_surface_destroy(surface);
>
>      draw (cr);
>      cairo_show_page (cr);

Right in there, you destroy the surface before you use it.


More information about the cairo mailing list