PDFDocument - page break or create multiple pages

I’ve been unable to set page breaks in a PDFDocument. Is there a way to do this? The sample Mac project constructs a simple PDF, but my attempts to set the page size only result in a single page PDF.

Note: This example project creates a PDF file on the Desktop, opens it in Preview, and does not delete the file.
Var f As FolderItem = SpecialFolder.Desktop.Child(“PDFPagesTest”)
myPDF.Save(f)

Xojo 2026r1, macOS 6.4 (25E246)

PDFPages.zip (7.7 KB)

Sorry, I see it was solved here. Thanks.

PDFDocument has a PDFGraphics property, that has a NewPage method which can take a size for the new page, or use the currently defined page size.

Thanks. I don’t see “NewPage” at that link, but I did see “NextPage” that adds a new page. My mistake was to asssume NextPage was for moving to the next page, rather than reading the description.

Whoops my bad. I’m on a phone on a cruise ship.