The primary purpose of the C1MultiDocument component is to handle large documents that it would otherwise be impossible to create/export/print due to memory limitations. There are no limitations on the size and number of documents. But you may have to use disk storage rather than (default) memory, see the SetStorage methods for details.
A multi-document has a limitation that may or may not be significant depending on the specific application: it does NOT allow you to access the object model of C1PrintDocuments contained within. In other words, while you can write the following code:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim mdoc As New C1MultiDocument() mdoc.Items.Add(C1PrintDocument.FromFile("file1.c1dx")) mdoc.Items.Add(C1PrintDocument.FromFile("file2.c1dx")) mdoc.Items.Add(C1PrintDocument.FromFile("file3.c1dx")) |
To write code in C#
C# |
Copy Code
|
---|---|
C1MultiDocument mdoc = new C1MultiDocument(); mdoc.Items.Add(C1PrintDocument.FromFile("file1.c1dx")); mdoc.Items.Add(C1PrintDocument.FromFile("file2.c1dx")); mdoc.Items.Add(C1PrintDocument.FromFile("file3.c1dx")); |
You CANNOT then add something like the following:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim doc As C1PrintDocument = mdoc.Items(1) |
To write code in C#
C# |
Copy Code
|
---|---|
C1PrintDocument doc = mdoc.Items[1]; |
If that limitation is not an issue for a particular application, then you can even use the C1MultiDocument component to "modularize" the application even if there are no memory problems.