Hello:
I have a big org chart diagram with about 450 nodes (I modified the DataSetDemo45 and I added more rows). I used the code from the user guide to export it to pdf. The Generate method bombed with OutOfMemoryException. The second run was successful. Is there a way to tell the pdf writer to reduce the memory footprint?
I also got this error:
An exception of type ‘System.ArgumentException’ occurred in System.Drawing.dll and wasn’t handled before a managed/native boundary
Additional information: Property must be set to a valid ColorBlend object to use interpolation colors. ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.
This is the code I used:
GoPdfWriter writer = new GoPdfWriter();
writer.View = goView1;
GoPdfMetadata meta = new GoPdfMetadata()
{
Title = "A Diagram",
Author = new List<string>() { "Author1", "Author2" },
Producer = "The Producer"
};
writer.PageSize = GoPdfPageSizes.A4;
writer.Scale = 0.80f;
writer.RegisterStandardGenerators();
writer.Generate(@"c:\temp\diagram.pdf");
I also noticed the org chart is printed on a single page. Is it possible to tell it to print on multiple pages at 100% similar to how a printer would work assuming that we print to A4 pages.
Thank you