csurface:SetSize(width_in_points, height_in_points)
This function should only be called before any drawing operations have been performed on the current page. The simplest way to do this is to call this function immediately after creating the surface or immediately after completing a page with either ccontext:ShowPage() or ccontext:CopyPage().