Convert byte[] to Word document - lay-out not correctly

Hi, 

We are saving our source files as .sfdt and in the end of our flow we want to generate a Word document from this .sfdt file. 

Currently I'm working this way:
 // download the .sfdt file and get is as a byte[]

 var sfdtByteArray = await _documentAgent.DownloadAttachment(entity.SourceUrl);

  // convert byte[] to string

 var bytesAsString = Encoding.UTF8.GetString(sfdtByteArray);

// to Word document

 var document = WordDocument.Save(bytesAsString, Syncfusion.EJ2.DocumentEditor.FormatType.Docx);


The original header isn't preserved... There is a white banner around the page.


Correct:


After converting with DocumentEditor in .Net core:


How can I fix this? In the Angular editor it shows correctly.


1 Reply

KB Kurthis Banu Abdul Majeeth Syncfusion Team October 27, 2021 01:50 PM UTC

Hi Jonah, 

We are cross checked your reported issue. We couldn’t reproduce your reported problem in our end. For your reference, we have attached the video demonstration with sample application which we used to reproduce the reported issue and it can be downloaded from the below link.  

Video demonstration: 

Sample Link: 

Note: 
Screenshots attached seems to use document which has different image than the input document which was shared by you. So, could please share original document with video demonstration reported problem. 
This will be more helpful to reproduce the same issue at our end. Thereby, we will proceed further on the reported issue and provide you the appropriate solution at the earliest.     

Note: If you have any confidential data in your document, please replace with some dummy data and provide us the same. We just need above details to recreate the problem you have face.     

Regards, 
Kurthis Banu A. 


Loader.
Up arrow icon