# Now how do I get the bounding box for each text paragraph in PDF?

Q: I am extracting Pdf paragraph using TextExtractor logic (http://
www.pdftron.com/pdfnet/samplecode.html#TextExtract).
While extracting text from pdf, paragraph may start/end in the middle
of the text. (ie., One single paragraph may split into multiple
paragraphs). Now how do I get the bounding box for each paragraph in
PDF?
----------------
A: You can obtain a bounding box for each line using line.GetBBox() or
GetQuad(). To fix a bounding box for paragraph compute the union of
all line bounding boxes. To find out to which paragraph a given line
belongs use line.GetParagraphID(). You can use this id to map to a
paragraph bbox. Please keep in mind that a 'paragraph' in the context
of 'pdftron.PDF.TextExtractor' is more like a 'text block' and is not
necessarily related to other notions of the word.