1. A machine-implemented method of processing an electronic document, comprising operating computer hardware to perform operations comprising: receiving logical blocks extracted from the electronic document including a text block comprising text lines each encompassed by a respective bounding rectangle; extending edges of ones of the bounding rectangles to at least one boundary without changing layout relationships among the logical blocks in the electronic document; generating a text layout boundary from extended and unextended edges of the bounding rectangles; and storing a description of the text layout boundary in a machine-readable medium.