I want tot convert binary data to text.
In my application, I get binary data from pdf,docx,xlsx,etc file
and I want tot convert this binary data to text to show file content in screen.
Can anyone answer what action should I use?
Hi @Aung Myat Kyaw,
There's an Action (BinaryDataToText) that you can get from BinaryData extension while taking dependency.
Have tried with this. Please try with this server action .
Hope this helps you!!!
Regards,
Rajat
Binary to Text return garbage text.
Hi @Aung Myat Kyaw
In Outsystems application pdf,docx,xlsx,etc file Store File as a Binary Format so don't Worry about the file extension :
Go to Dependency and call this Server action to Convert Binary To text:
I have attached oml File so go through this:
Thanks
Md Mansur
hello @Aung Myat Kyaw
Refer this link:
https://www.outsystems.com/forums/discussion/26731/converting-binary-data-to-text/
I hope this helps
If you want to display the content of a document like word asf. you would need a viewer that supports the document type. For PDF you may search the forge for pdf viewers like pdfjs.
If you only need the text from a document you would have to extract the content. E.g. a Wordx document is actually a XML document and an extraction service would extract the text content from the document. You may take a look at my Adobe Acrobat Services Forge component that allows to extract text from pdf documents. Alternatives are e.g. AWS Textract.
Hi @Aung Myat Kyaw ,
if you want to display file data in the screen then should use widgets like for image image widget and for pdf pdf viewer if you convert it in text, it is only like simple text.
Regards
Shradha
@Aung Myat Kyaw As you have binary data with you then why not to print same binary on screen by using iframe .
I also want to use some of the text of these file.(eg., first fifty characters)
So, I think I have to convert binary to text.
Hello @Aung Myat Kyaw ,
You could use Aspose: https://docs.aspose.com/pdf/net/extract-text-from-all-pdf/
You could create your own extension like this one: https://www.outsystems.com/forge/component-overview/686/aspose-words-o11, this reference one I don't think it has the conversion from pdf/excel/word to text. But my I ideia is something like that, implementing the "extract text".
I think you can't use "BinaryToText" from OS, because you're converting different types of files not ".txt" files. But I am not sure if you are using texts IN BINARY, so you could just change the Encoding:
Remind, this is only suggestions. Hope help you a bit.
Bye bye