In order to support plotting multi-page documents, an application may nest multiple AcPlPlotEngine::beginPage()/endPage() pairs between the beginDocument() and endDocument() calls. For example:
beginPlot(progress);
beginDocument(infoObj, myDoc);
beginPage(pgInfo, infoObj, false);
beginGenerateGraphics();
endGenerateGraphics();
endPage();
beginPage(pgInfo2, infoObj, true);
beginGenerateGraphics();
endGenerateGraphics();
endPage();
endDocument();
endPlot();
The following restrictions apply when plotting multi-page documents:
If an AcPlPlotInfo object passed to beginPage() is not document compatible with the AcPlPlotInfo object passed to beginDocument(), beginPage() returns an error.