System.NotImplementedException: 'Creating a content control for the BuildingBlockGallerytype is not implemented'

When I try to convert a sfdt to a WordDocument object i get this error:




Here's the code:

public static void sfdtToDocx(string sfdtPath, string fileName)

{

// sfdt is the txt file with the sfdt

StreamReader reader = File.OpenText(sfdtPath);

string sfdt = reader.ReadToEnd();

reader.Close();


sfdt = JsonConvert.SerializeObject(data);


// this is the line that throws me the error

Stream wordDocument = WordDocument.Save(sfdt, FormatType.Docx);

DocIO.DLS.WordDocument document = new DocIO.DLS.WordDocument(wordDocument, DocIO.FormatType.Docx);


FileStream fileStream = new FileStream(new FileInfo(sfdtPath).Directory.FullName+Path.DirectorySeparatorChar+fileName+".docx", FileMode.Create);

document.Save(fileStream, DocIO.FormatType.Docx);

fileStream.Position = 0;

fileStream.Close();

document.Close();

}


I'm using 

Syncfusion.EJ2.WordEditor.AspNet.Core  Version="19.3.0.46"


I also attach the sfdt


Attachment: sfdt_54d40b56.rar


11 Replies

SM Suriya Murugan Syncfusion Team October 25, 2021 10:05 AM UTC

Hi Andres, 

Syncfusion Greetings! 

We suspect the issue because of the sfdt. We have included the fix related to this. Can you please recreate the Sfdt by using latest version and try exporting document? Please let us know if you still facing issue. 

Regards, 
Suriya M. 



AM Andres Montoya October 26, 2021 01:25 PM UTC

I update to the latest version (19.3.0.46) and get the same error:




(to create the sfdt I also used the latest version)




SM Suriya Murugan Syncfusion Team October 27, 2021 09:29 AM UTC

Hi Andres, 

Thanks for sharing the details. 

We can reproduce the reported issue when using code shared by you. If we load the provided sfdt and save in back end using save API, it exports properly without any issue.  

1.      Can you please share the original document from were creating sfdt document? 
2.      Are you loading document into document editor or any other? Can you please share process? 

That will be helpful for us to proceed further and provide you solution at earliest. 

Regards, 
Suriya M. 



AM Andres Montoya replied to Suriya Murugan November 1, 2021 04:31 PM UTC

Here is the code:



that's the sfdt that I save in the txt file


Attachment: document_8bcca214.rar


SM Suriya Murugan Syncfusion Team November 2, 2021 06:57 AM UTC

Hi Andres, 

We can reproduce the reported issue without loading the document in document editor and processing it in back end alone. We will validate and update further details by November 8,2021. 

In mean time, can you please share your exact requirement? Why you were import and exporting the document in backend itself without opening it in document editor? If you open and export using backend, it is working properly. 

Regards, 
Suriya M. 



KB Kurthis Banu Abdul Majeeth Syncfusion Team November 9, 2021 03:50 AM UTC

Hi Andres,  

Sorry for the inconvenience caused.   

We need additional timeline to validate the exact root cause of this issue. We will update further details by November 10,2021.   

Regards,  
Kurthis Banu A.  



KB Kurthis Banu Abdul Majeeth Syncfusion Team November 10, 2021 05:35 PM UTC

Hi Andres,  

We have confirmed the reported issue as bug and logged the defect report. We will fix this issue and include in our EJ2 patch release which scheduled on November 30,2021.       

You can track the status of bug through below feedback link:       

Regards,   
Kurthis Banu A.   



SM Suriya Murugan Syncfusion Team December 1, 2021 03:33 AM UTC

Hi Andres,  

We deeply regret for the inconvenience caused.  

We are not possible to include the fix in our latest patch release. We are facing issue in the content control property serialization in the client side, so we are unable to provide the fix as promised. We are working on this with priority we will include the fix in the 2021 Vol 4 release which will be in the mid of December 2021. We would appreciate your valuable patience until then.   

You can track the status of bug through below feedback link: 

Regards,   
Suriya M. 



SM Suriya Murugan Syncfusion Team December 20, 2021 07:51 AM UTC

Hi Andres, 


We are glad to announce that our Essential Studio 2021 Volume 4 release v19.4.0.38  is rolled out and is available for download under the following link and we have added the fix for reported issue. 



Release Notes: 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 


Regards,           
Suriya M.


KB Kurthis Banu Abdul Majeeth Syncfusion Team December 20, 2021 09:48 AM UTC

Hi Andres,  

We are glad to announce that our Essential Studio 2021 Volume 4 release v19.4.0.38  is rolled out and is available for download under the following link and we have added the fix for reported issue. 



 
Release Notes: 

Feedback Link: 

Regards, 
Kurthis Banu A. 



SM Suriya Murugan Syncfusion Team January 20, 2022 06:42 AM UTC

Hi Andres,


We are glad to announce that our Nuget release v19.4.0.43 is rolled out and in this release, we have added fix for reported issue. 


Please upgrade your packages to latest version.


Core:    

https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core/19.4.0.43 

    

MVC:    

https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc4/19.4.0.43 

  

https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc5/19.4.0.43   


Feedback link: https://www.syncfusion.com/feedback/30278/facing-exception-when-exporting-without-loading-document-in-document-editor


Regards,

Suriya M.


Loader.
Up arrow icon