SfRichTextRibbon - Saving to RTF - Corrupts File Saved

.NetFrameWork 4.6 - WPF App - Visual Studio 2019 - Latest version of SyncFusion

Created RibbonWindow with a SfRichTextRibbon and a SfRichTextBoxAdv 
Loaded an RTF from a Byte(),  converted to a MemoryStream(Byte) into the SfRichTextBoxAdv(stream, format) and setting the SfRichTextBoxAdv,DocumentTitle to a valid .rtf Filename string

When pressing SAVE from the RibbonMenu a few problems arise
1. On the save file Dialog the FileType defaulted to is NOT .RTF  it defaults to .DOCX but the file name box stills has the .RTF extension
2. When saving to an .RTF file the produced file is corrupted.. any other format selected saves a valid file

When Pressing Save AS...get similar results

When using syncfusion:SkinStorage.VisualStyle="Office2013" as the Theme  
1. selecting from FILE (TAB), how can the HELP Option be either removed or edited

When NOT selecting a THEME and using the default.
1. The SAVE AS option does NOT include an RTF option.

Note: The MemoryStream used contains a valid file, proved by saving using Computer.FileSystem.WriteAllBytes into a valid file.

When Loading a .DOC into the SfRichTextBoxAdv using the same process... Byte() into MemoryStream into SfRichTextBoxAdv and saving into an .RTF using the Ribbon, file Created is VALID! But the Save Dialog is still mixed matched from file extension and File type defaulted to. The filetype in the save dialog should default to the file type that
matches the filename extension.

10 Replies

PS Premkumar Sundaramoorthy Syncfusion Team April 13, 2020 09:23 AM UTC

Hi Eric,

Thank you for contacting Syncfusion support, 
Query  
Response  
On the save file Dialog the FileType defaulted to is NOT .RTF  it defaults to .DOCX but the file name box stills has the .RTF extension 
In SfRichTextBoxAdv we do not have support to save the changes in the same file. We support only the SaveAs operation.
 So, we don’t consider the document title or loaded document name or extensions.
But you can achieve this by implementing the customized SfRichTextRibbon control.

The SfRichTextRibbon control is a customized Ribbon with primary functionalities for SfRichTextBoxAdv control and there is no possibility to add/remove any items from SfRichTextRibbon.
Instead, you can implement your customized ribbon for SfRichTextBoxAdv using Ribbon control based on your requirements

Here we have prepared the sample to demonstrate how to create your ribbon with your requirement of removing Help Tab and showing the extension as “RTF”.
Customized ribbon 
On the save file Dialog the FileType defaulted to is NOT .RTF  it defaults to .DOCX but the file name box stills has the .RTF extension 
 
selecting from FILE (TAB), how can the HELP Option be either removed or edited 
When saving to an .RTF file the produced file is corrupted. any other format selected saves a valid file 
We have tried the same in the attached sample but we don’t face any issue. And we suspect that this issue is document specific.

So, please share your input document to reproduce this issue from our end. 
When NOT selecting a THEME and using the default. 
1. The SAVE AS option does NOT include an RTF option. 
We couldn’t reproduce the reported issue that the RTF option is missing save as file dialog.

Could you please share more details like in which theme you are facing this issue and screenshot with replication steps to reproduce this issue from our end. 

Please let us know if you have any other questions,

Regards,
Premkumar 



EH Eric Hinkle April 14, 2020 07:16 AM UTC

HI Premkumar , First of all let me thank you for your time.

I understand that a Customized Ribbon would be the answer to editing and controlling ribbon options.
I will review your sample. THanks!

Now I have included some sample files to clarify the following .

1. I have found that the RTF file coruption happens when the rtf file contains certain objects, in my case the rtf files contain some type of fill-in fields.
your SfRichTextBoxAdv would display these fields (somewhat skewed) but at the moment you try to save the Document it will Corrupt the output file.
Look for file included named ( 2. Legal_Document_TextFieldsCurruptsOnSave.rtf )

2. Some RTF more complicated content created in Microsoft Word would no open at all in the SfRichTextBoxAdv, meanwhile it does open in Wordpad (slightly altered)
after processed by wordpad and resaved, them your SfRichTextBoxAdv would open it..
Look for included rtf file named ( 1. RichTextBox_Content_Not_Compatible.rtf )

3. Included is a pic of the SfRichTextBoxAdv with no theme applied, here you can see the SAVE-AS dialog opened and the lack of the RTF option.
Look for included file named ( 3. Save-AS_No_RTF.png )

4. For reference here I also include the xaml used to create the above SfRichTextRibbon, not the lack of reference to add a theme.
Look for included file named ( 4. SfRichTextBoxRibbon_NoRtfSaveAs.xaml )





EH Eric Hinkle April 14, 2020 07:20 AM UTC

included files here...

Attachment: RTF_Conflicts_bead90b3.zip


PS Premkumar Sundaramoorthy Syncfusion Team April 15, 2020 10:55 AM UTC

Hi Eric,

Thank you for your update,

We can reproduce the below listed issues in our end and suspect it to be a defect. We will validate this issue and update you with more details on 17th April 2020. 
·         Document gets corrupted while exporting as RTF 
·         Document not rendered while importing RTF file 
·         RTF option missing in SaveAs of SfRichTextRibbon 
Please let us know if you have any other questions,

Regards,
Premkumar



PS Premkumar Sundaramoorthy Syncfusion Team April 20, 2020 12:05 PM UTC

Hi Eric,

Thank you for your patience, 
Query 
Response  
Document gets corrupted while exporting as RTF 
We confirmed that the suspected issue with “Document gets corrupted while exporting as RTF” is a defect. We have logged a defect report. The fix for this defect is estimated to be available on 8th May 2020. 
RTF option missing in SaveAs of SfRichTextRibbon 
As we said earlier the RTF option can be included in Saves by customizing the ribbon. Here we have attached the sample to demonstrates the same.

https://www.syncfusion.com/downloads/support/forum/153248/ze/Ribbon_Custom-851085590

 
 Document not rendered while importing RTF file 
This issue occurs from our dependent control DocIO library. So, we need some more time to validate this issue. We will validate this issue and update you with more details on or before 22nd April 2020. 

Please let us know if you have any other questions.

Regards, 
Premkumar 



PS Premkumar Sundaramoorthy Syncfusion Team April 22, 2020 05:31 PM UTC

Hi Eric,

We regret for incontinence, due to the complexity and dependency of the reported issue, we need some more time to validate this issue. We will validate this issue and update you with more details on or before 24th April 2020.

Please let us know if you have any other questions

Regards,
Premkumar 



PS Premkumar Sundaramoorthy Syncfusion Team April 27, 2020 03:05 AM UTC

Hi Eric,

Thank you for your patience,

On further analysis, we found the provide document conations shape element which is not supported in our control and already we have a feature request for this and we do not have any immediate plan to implement this feature. We will let you know once the feature is implemented. To track the status of the feature, please use the following feedback link.

https://www.syncfusion.com/feedback/3014/support-for-shapes-and-textbox-in-word-document

As a workaround, you can replace the shape with the image here we have attached the modified document for your reference. Please confirm whether it is suitable for your requirements? Thereby we will share the plan to fix the other preservations issues in this document.
https://www.syncfusion.com/downloads/support/forum/153248/ze/Not_Compatible_Modified2085722050

Please let us know if you have any other questions.

Regards,
Premkumar
 



EH Eric Hinkle April 28, 2020 09:05 PM UTC

Hi Premkumar ,

I understand the limitation, and support for TextBoxes would be great,
I will keep an aye out for further updtes.

I will modify my documents and work round these objects, thanks

Eric




PS Premkumar Sundaramoorthy Syncfusion Team April 29, 2020 05:48 AM UTC

Hi Eric, 
Thanks for your update,

As we promised earlier we will fix this issue with “Document gets corrupted while exporting as RTF” and provide you the patch on 8th May 2020.

Please let us know if you have any other questions.

Regards,
 
Premkumar 



PS Premkumar Sundaramoorthy Syncfusion Team May 8, 2020 01:54 PM UTC

Hi Eric,

Thanks for your patience,

We have fixed the issue with “Document gets corrupted while exporting as RTF” and included it in our upcoming Volume 1 SP 1 release which will be estimated to deliver on 13th May 2020 tentatively.

we will let you know once the volume 1 Sp1 release is rolled out.

Regards,
Premkumar 


Loader.
Up arrow icon