Problem with C1Multidocument and Save

Posted by: claude on 21 December 2021, 9:02 pm EST

  • 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?



  • Posted 22 December 2021, 10:14 pm EST

    Hi Claude,

    We have escalated the issue to the development team to get their insights and will let you know when we have an update. [Tracking ID: C1WIN-26414]

    You can either use the Export() method instead of the Save() method or you can extend the C1MultiDocument class and override the Save() method and call Generate() before calling the Save() of the base class i.e C1MultiDocument.

    Regards Avnish

  • Posted 25 April 2023, 8:22 pm EST


    The issue has been fixed. Please update and let us know if you face any issues.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels