Posted 21 December 2021, 9:02 pm EST
Hello. I just noticed a problem with the SAVE function of the C1Multidocument component. You have to do a GENERATE before calling the SAVE function, which is a shame. Here is a piece of code with the problem. For this to work you have to uncomment the line with the GENERATE function. C1MultiDocument c1MDoc = new C1MultiDocument(); c1MDoc.SetStorage(StorageType.Disk); c1MDoc.Items.Add(c1DocA); c1MDoc.Items.Add(c1DocB); //c1MDoc.Generate(); c1MDoc.Save(@“D:\Work\MultiDoc.C1mdx”);
On the other hand, it works very well to SAVE a C1PrintDocument without having called GENERATE. C1PrintDocument c1DocA = new C1PrintDocument(); RenderText temp = new C1.C1Preview.RenderText(); temp.Text = “Hello World !”; c1DocA.Body.Children.Add(temp); string Filename = @“D:\Work\DocA.C1dx”; c1DocA.Save(Filename);
Any idea if the problem appears to be a bug? Or if an alternative exists?
Regards.
Claude