The core class of the ComponentOne Preview Classic for WinForms's document creating engine is C1PrintDocument. C1PrintDocument represents a single generated document and allows users to set up page settings, including size, orientation, margins, columns, and running titles, and to generate page content by means of a set of rendering methods. To generate a new document, a user must perform the following actions:
1. Create an object of the type C1PrintDocument. This can be accomplished either through code or by adding C1PrintDocument onto a form.
2. Start the generation process with the StartDoc method.
3. Draw the content of the document using render objects and related methods.
4. Finish the generation process with the EndDoc method.
If the C1PrintPreview control is connected to the C1PrintDocument component via its Document property, then the generated pages of the document will appear in the C1PrintPreview control as they are created.
|