Back to Blog

    Developer Blog

    How can I determine the width and height of a text object before inserting it to a page, which is in order to calculate the starting position more conveniently?

    Foxit PDF SDK 5.3

    Foxit PDF SDK provides the interface FSCRT_Font_GetCharBBox (FSCRT_Font font, FS_DWORD Unicode, FSCRT_RECT * bbox) to get the width and height of a text object.

    Note: This article refers to a deprecated version of a Foxit Product. If you are still using Foxit PDF SDK 5.3 or older, please refer to your download package documents for Developer Guide and API Reference.

    Get a trial version of the new Foxit PDF SDK and see our latest generation SDK’s brand new features!