Dear All,
We are facing one issue while using download widget with TexttoBinaryData.
specially it gives issue for docx file extension not for doc extension.
Error:
Please suggest.
Thanks & Regards
Ashish
Hi, @Ashish Akolkar
Its seems to be your words file viewer issue file is succsfully downloaded when you are opening you get this error.
Try to open with any online doc viewer
Thanks
Rizwan
I understand you are calling TexttoBinaryData with the parameter "testText" and downloading TexttoBinaryData.BinaryData as "doc.docx". Please note that this approach will NOT work. You cannot simply rename any content as a .docx or .pdf file. These files must follow a specific format to be recognized as .docx or .pdf. Therefore, you must create a .docx file properly to download it as a .docx file.
To demonstrate, open Notepad, write "test" inside it, and save it as "doc.docx". You will see that it does not open successfully in MS Word.
Hi Ashish Akolkar,
The issue I found is that you are missing the text-to-binary data action and the appropriate encoding format.
Can you add anyone of the encoding format"unicode, utf-8, utf-16, ascii"
Hello
To resolve the issue with DOCX files, ensure that you are setting the correct MIME type and file
Create a server action (e.g., DownloadDocxFile) to convert text to binary data and set the appropriate MIME type.
Use TextToBinaryData to convert the text content.
Add a button to trigger the download action.
Configure the download widget with the binary content, MIME type, and file name.
This should ensure your DOCX files are downloaded correctly.
i hope it's help you