Ingesting & indexing text files while keeping formatting

but now that I think about it,

I really think you should change how your thinking to do this.

Instead of pulling in the whole file. I think you should just parse the file, create separate fields for all the invoce data and then just have a URL for the user to download the original file

So your meta data might look like this ( Just assuming since you said it was an invoice type data

 {
 "account:"1234567",
 "fName:"Ed"
  "lname:"Perry"
  "Balance": 12.50
  "30day": 1.00
  "90day":  10.00
  "Interest": 1.50
  "lineitems": [  "book 123432","shoes 1234444"]
  "invoce": "http://<blah>/invoice.txt"
 }