Flatten pages