Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

How can I get a bounding box (coordinates) for a text object?

Question

How can I get a bounding box (coordinates) for a text object?

Answer

The GetPageText function can be used to retrieve the bounding box of a text object. The parameters for this function let you choose ExtractOptions, if you choose option 3, then the function will return a CSV string for each piece of text on the page with the following format:


Font Name, Text Color, Text Size, X1, Y1, X2, Y2, X3, Y3, X4, Y4, Text

The coordinates belong to the following corners of a rectangle:

X1, Y1 = bottom left
X2, Y2 = bottom right
X3, Y3 = top right
X4, Y4 = top left

The co-ordinates are the four points bounding the text, measured using the units set with the SetMeasurementUnits function and the origin set with the SetOrigin function.


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum