I've got pdf file that looks like it: example
It would be easy if each word of first line would have child in the next one. But sometimes the parents are empty below. I can get whole text from pdf and find those two lines. But if there is break in third column then reading the whole text I lose information if the third word was in forth column or third column. I hope I've made it clear, but I would appreciate idea how to read those two lines and connecting them, considering that not each parent has child in next line.