Developer Posts

List of the common problems with licensing and getting a watermark.

by Conor Smith | April 4, 2017
Sometimes even after licensing Foxit PDF SDK ActiveX you can still get a watermark on your PDF files. The most common problems causing that are described below: License is not applied correctly. Please call UnlockActiveX after the ActiveX component initialized.  Please also check if there is spacing in the unlock code that shouldn’t be there. axFoxitPDFSDK1.UnLockActiveX("XXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); […]
Keep reading Keep reading

How to use the OnShowSavePrompt?

by Conor Smith | April 4, 2017
To use the OnShowSavePrompt function in Foxit PDF SDK ActiveX,  follow the guidelines below: Setting bShow=false will disable the prompt when closing the ActiveX. Setting the following will control how the PDF is handled without the prompt. // nResult=0 is not to save. // nResult=1 is to save. // nResult=6 no setting has been set. private void […]
Keep reading Keep reading

How to render only a section of a PDF?

by Conor Smith | April 4, 2017
It is possible to render only a section of a PDF with the functionality provided in Foxit PDF SDK. The steps to do that are outlined below: Foxit PDF SDK  Change the parameters of FSPDF_Page_GetMatrix before rendering Go to “samples\simple_sample\comm_src\fgsdk_common.cpp” of the evaluation package and locate the call for FSPDF_Page_GetMatrix Change the parameters.  For example, […]
Keep reading Keep reading

How to support non-standard fonts on Foxit PDF SDK?

by Conor Smith | April 4, 2017
To support non-standard fonts on Foxit PDF SDK, follow the steps outlined below: Use the FSCRT_Library_AddFontFile or use FSCRT_Library_SetFontMapperHandler. Create the callback to handle the non-standard font. static FSCRT_FONTMAPPERHANDLER ExternalFontMapper;  static FS_RESULT MapExternalFont(FS_LPVOID clientData, FS_LPCSTR fontName, FS_DWORD fontStyles, FS_INT32 weight, FS_INT32 charset, FSCRT_FILE *fontFile, FS_INT32 *faceIndex){         if(fontName=="randomFontName") {             //set fontFile to use the non-Standard font […]
Keep reading Keep reading

Does Foxit WebPDF Viewer support Docker deployments?

by Rowan Hanna | April 4, 2017
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. […]
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
Used everywhere

Trusted by