We are using your Diagram Control (WinForms) to produce database diagrams for large number of tables and their field-to-field connections. It is not unusual to have in excess of 200 tables, and several thousand connections on a diagram. This does work just fine, both the diagram window and the overview window can handle this requirement.
However, we would also like to save these diagrams as: Image, Word and PDF Documents. We totally get it that both the Word and PDF documents will need to contain multiple pages that contain a portion of the overall diagram.
Our issue is with the ExportDiagramAsImage method. We are quite certain that the issue is a memory overflow. The ExportDiagramAsImage always returns an "Invalid Parameter" error.
A diagram may be 16,063 pixels wide by 42,883 pixels high - according to the bounds of the diagram object.
At full color, this translates into about 5GB of memory ( 6 * 16053 * 42883).
We totally get it that this is simply too large, and you are not in control of memory management.
Our question is: Is there some approach to perhaps capturing a "moving window" to reduce the memory requirements. We certainly know the native size of the diagram and could easily walk that using smaller windows, but we have been unable to locate a method in the Diagram class that accepts any "boundary rectangle" that could be converted to an image.
Thoughts?