protocol.closeCanvasPage(canvasAttributes);
//pageContext.popCanvasType();
// Pop the device layout context created from the anonymous layout.
pageContext.popDeviceLayoutContext();
// This has to happen after close canvas page so that the
// protocol's page and body buffers are closed properly.
// TODO: refactor closeCanvasPage to split out page rendering
// so that we can pop this before page rendering takes place.