153
Views
11
Comments
Binary Data to Text
Discussion

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?

2020-07-21 19-28-50
Rajat Agrawal
Champion

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

2022-08-21 14-43-29
Aung Myat Kyaw

Binary to Text return garbage text.

UserImage.jpg
Md Mansur

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


BinaryToText.oml
2022-08-21 14-43-29
Aung Myat Kyaw

Binary to Text return garbage text.

2025-07-28 06-45-20
Rupesh Patil
2022-08-21 14-43-29
Aung Myat Kyaw

Binary to Text return garbage text.

2021-10-09 07-57-44
Stefan Weber
 
MVP

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.


2024-07-16 17-36-51
Shradha Rawlani

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

2023-12-14 09-56-57
Yogesh Javir

@Aung Myat Kyaw
As you have binary data with you then why not to print same binary on screen by using iframe .


2022-08-21 14-43-29
Aung Myat Kyaw

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.

2022-08-25 11-13-48
Bruno Gomes

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.