Foxit PDF SDK 5.3

Why the length of the string retrieved from interface FSPDF_TextPage_GetChars is different from the count of characters getting from interface FSPDF_TextPage_CountChars?

by Conor Smith | March 26, 2017
The string retrieved from interface FSPDF_TextPage_GetChars is a UTF-8 string. The interface FSPDF_TextPage_CountChars gets the count of characters in a page. “The length of string” and “the count of characters” are two totally different concepts. The length of a UTF-8 string represents how many bytes the UTF-8 string consumes, rather than how many characters the […]
Keep reading Keep reading

How to render only part of a PDF page?

by Conor Smith | March 26, 2017
To render only part of a PDF page, the key point is to ensure that the rendering page size is larger than the device’s display area. Contents that are not on the display area will not be rendered. Foxit PDF SDK provides the interface FSPDF_Page_GetMatrix to get page’s transformation matrix which can be used for […]
Keep reading Keep reading

Why the length of the string retrieved from interface FSPDF_TextPage_GetChars is different from the count of characters getting from interface FSPDF_TextPage_CountChars?

by Conor Smith | March 26, 2017
The string retrieved from interface FSPDF_TextPage_GetChars is a UTF-8 string. The interface FSPDF_TextPage_CountChars gets the count of characters in a page. “The length of string” and “the count of characters” are two totally different concepts. The length of a UTF-8 string represents how many bytes the UTF-8 string consumes, rather than how many characters the […]
Keep reading Keep reading

Why can’t I get the desired filling color if the bitmap format is not ARGB or RGB or if the bitmap contains alpha channel when using the interface FSCRT_Bitmap_FillRect?

by Conor Smith | March 26, 2017
Before SDK 4.4 version, there exist two bugs when using the interface FSCRT_Bitmap_FillRect to fill a bitmap object with a specified color. FSCRT_Bitmap_FillRect just only receives the color format of ARGB, but it does not judge the format of the bitmap and treats all bitmap formats as ARGB. So, users cannot get the desired filling […]
Keep reading Keep reading

How can I display fonts correctly?

by Conor Smith | March 26, 2017
Foxit PDF SDK provides the interface of FSCRT_Library_AddFontFile or FSCRT_Library_SetFontMapperHandler to display fonts. Following is a sample to show how to use FSCRT_Library_SetFontMapperHandler in C++. static FSCRT_FONTMAPPERHANDLER ExternalFontMapper; static string FallbackFontPath; // MapExternalFont function will be triggered when an external font is needed. static FS_RESULT MapExternalFont(FS_LPVOID clientData, FS_LPCSTR fontName, FS_DWORD fontStyles, FS_INT32 weight, FS_INT32 charset, […]
Keep reading Keep reading

What is the role of the interface FSPDF_Doc_InitiateJavaScript? And why would it destroy the form actions when calling the interface FSPDF_Doc_InitiateJavaScript before FSPDF_Doc_SetActionHandler?

by Conor Smith | March 26, 2017
FSPDF_Doc_InitiateJavaScript is mainly used for initiating javascript, such as a series of javascript functions and global variables that are stated by users. When opening a document, we should call this interface to initiate javascript, which may generate other actions that need support from external application. So the interface FSPDF_Doc_InitiateJavaScript should be called after FSPDF_Doc_SetActionHandler. Otherwise, […]
Keep reading Keep reading
Used everywhere

Trusted by