I want to make proper structured txt file out of scanned pdf file in Google document ai ocr response, but I get a json response from the document. An ocr response which contains all text of file in one string and X,Y coordinates of pdf file image along with indexes of blocks or tokens for that string. I am not able to map that text on received coordinates to make a txt file or some other format file.
How can I save this as a txt file?