Hi Klaus, The Canvas documentation mentions a method render (https://developer.gnome.org/goocanvasmm/stable/classGoocanvas_1_1Canvas.html#a54aa434b9bfa110dc74e1435b9a6f81d), which can be used to draw the canvas onto a cairo context of your choosing. I think you can use this method from a Gtk::PrintOperation’s signal_draw_page handler, where the cairo context can be fetched from the printcontext using get_cairo_context. I explained a similar workflow in https://tschoonj.github.io/blog/2015/07/05/embedding-plplot-in-gtk-drawingareas/ where you can send the contents of a Gtk::DrawingArea to either a file or a printer. Best, Tom
|