Py5Graphics.next_page()

Py5Graphics.next_page()#

Move to the next page in a PDF document.

Examples#

def setup():
    py5.size(600, 600, py5.PDF, "/tmp/test.pdf")


def draw():
    for _ in range(50):
        py5.rect(py5.random_int(py5.width), py5.random_int(py5.height), 10, 10)

    if py5.frame_count < 5:
        py5.get_graphics().next_page()
    else:
        py5.exit_sketch()

Description#

Move to the next page in a PDF document. This method is only available when using a PDF Py5Graphics object. Using this method with any other graphics renderer will result in an error.

Underlying Processing method: PGraphics.nextPage

Signatures#

next_page() -> None

Updated on August 02, 2023 16:07:04pm UTC