// Loop through all pages, open an output file for every page,
// print the docobjects, close the file.
RECORD ARRAY allpages := SELECT id,name FROM pages;
FOREVERY (RECORD thispage FROM allpages)
{
OpenFile(thispage.id);
PrintPageBody();
CloseFile();
} |