Any files can be categorized into binary or text files
Although the file which appear on the computer may look the same, it differs its type by the way the file is encoded.
While both types of files contain data in series of bites (the binary value of 0 & 1), text files strictly contain the textual content compare to the binary files containing custom data.
Text Files - only textual data
Binary Files - both textual and custom data
When the image viewer renders the image of a flower, the file opened in the text editor displays unrecognizable characters.
However, since the PNG-file format includes the small sections of textual data, some parts of the content is readable text.
Text Files can be categorized to plain text format (.txt) and rich text format (.rtf)
Plain Text Format (.txt)
Rich Text File (.rtf)
I can say that after I started to work with documents and PDF files more often, I started to think about security way more. Thankfully, it didn't take me long to discover https://pdfleader.com/ and start working with PDF without any complications, and I know for a fact that my data is secure that way.