Insights, tutorials, and updates from the Foxit PDF SDK engineering team.
Yes, Foxit WebPDF Viewer supports Docker deployments. A Docker Image for WebPDF Viewer is provided in the Docker Hub public repository: https://hub.docker.com/r/foxitsoftware/webpdf/ Note: This article refers to a deprecated version of a Foxit Product. If you are still using Foxit WebPDF Viewer, please refer to your download package documents for Developer Guide and API Reference. [...]
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 [...]
Figure 1(a) shows the rotation of a text object around the origin of coordinates in Foxit PDF SDK. If we want to rotate a text object around its center as shown in Figure 1(b), a set of complex transformations are needed. The complete transformation process is shown in Figure 2. First, translate the center of [...]
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 [...]
The project uses dom4j->xml-apis, it calls node class from dom4j but not from JDK. So it reports node class error. To solve the problem, right click properties of the project, select builder path, and then move the JDK up to maven dependencies, it will call the node class from JDK. The error will disappear. Note: [...]
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 [...]
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 [...]
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, [...]
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, [...]
One PDF Form (FSPDF_FORM) can contain more than one Form Field, and one Form Field can contain more than one Form Control (FSPDF_ FORMCONTROL). Form Control (FSPDF_ FORMCONTROL) and Annotation (FSCRT_ANNOT) belong to the type of “annotation”. The difference is that FSPDF_ FORMCONTROL denotes the “widget” annotations, and FSCRT_ANNOT denotes other annotations which are not [...]