Finally, I figured out. I have to render to a cairo Context, like this:
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h)
ctx = cairo.Context(surface)
page.render(ctx)
img = Gdk.pixbuf_get_from_surface(ctx.get_target(), 0, 0,
ctx.get_target().get_width(),
ctx.get_target().get_height())