Looks like the library looks at text directly after extraction. But it would be nice to fetch the bounding box values for header/footer regions based on the algorithm's outcome to define th scope of header footer regions so that those regions can be eliminated during text extraction.