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:
- The device must support multi-page capability.
- All the pages in the job must be document compatible. (See Plot API Terminology for a definition of the term.)
If an AcPlPlotInfo object passed to beginPage() is not document compatible with the AcPlPlotInfo object passed to beginDocument(), beginPage() returns an error.
- When calling beginPage(), applications must set the bLastPage argument to false for every page except the last one.