In
Page on Demand Printing,
the application provides code to print an arbitrary page. The application should be prepared to print pages in any order. This is the preferred means of implementing printing. Page on Demand printing uses the
with-document-pages
macro, which iterates over all pages in the document.