Obsolete

Definitions for all the deprecated macros, structures and functions of Foxit PDF SDK.
Definitions and functions in this module are included in fs_obsolete.h, and not recommend to use them any more.
More...

Classes

struct  FSPDF_ACTION_HANDLER
 Structure for action handler information. More...
 
struct  FSPDF_ENUMPAGESIZEHANDLER
 Structure for page size enumeration. More...
 

Macros

#define FSPDF_RENDERCONTEXTFLAG_LIMITEDIMAGECACHE   0x0010
 Limit image cache size. More...
 

Functions

FS_RESULT FSPDF_Doc_SetActionHandler (FSCRT_DOCUMENT document, FSPDF_ACTION_HANDLER *actionHandler)
 Set the action handler to the PDF document. More...
 
FS_RESULT FSPDF_Doc_EnumAllPageSize (FSCRT_DOCUMENT document, FSPDF_ENUMPAGESIZEHANDLER *enumHandler)
 Enumerate the size of all page. More...
 
FS_RESULT FSPDF_TextPage_GetNextCharIndexByDirection (FSPDF_TEXTPAGE textPage, FS_INT32 curIndex, FS_INT32 direction, FS_INT32 *nextIndex)
 Get index of next character of a specific character in a specific direction. More...
 

Macro Definitions for Text Direction Flags

Deprecated:
Current macro definitions have been deprecated with function FSPDF_TextPage_GetNextCharIndexByDirection, since Foxit PDF SDK 4.3. So, not recommend to use current function any more.
Note
These are used in function FSPDF_TextPage_GetNextCharIndexByDirection.
#define FSPDF_TEXTDIRECTION_LEFT   -1
 Text direction: left.
 
#define FSPDF_TEXTDIRECTION_RIGHT   1
 Text direction: right.
 
#define FSPDF_TEXTDIRECTION_UP   -2
 Text direction: up.
 
#define FSPDF_TEXTDIRECTION_DOWN   2
 Text direction: down.
 

Detailed Description

Definitions for all the deprecated macros, structures and functions of Foxit PDF SDK.
Definitions and functions in this module are included in fs_obsolete.h, and not recommend to use them any more.

Macro Definition Documentation

#define FSPDF_RENDERCONTEXTFLAG_LIMITEDIMAGECACHE   0x0010

Limit image cache size.

Deprecated:
Current macro definition has been deprecated , since Foxit PDF SDK 5.1. So, not recommend to use it to function FSPDF_RenderContext_SetFlags any more.

This will help to save memory for a large amount of image data.

Function Documentation

FS_RESULT FSPDF_Doc_EnumAllPageSize ( FSCRT_DOCUMENT  document,
FSPDF_ENUMPAGESIZEHANDLER enumHandler 
)

Enumerate the size of all page.

Deprecated:
Current function has been deprecated since Foxit PDF SDK 4.5. So, not recommend to use current function any more. User can use function FSPDF_Doc_EnumPagesInfo instead.

This function is used for enumerating all page's size quickly. Application can get page size for each page from callback function FSPDF_ENUMPAGESIZEHANDLER::EnumPageSize.
if the parameter document is loaded in asynchronous mode, application should ensure that data of document is available, and the data of all pages are available as well.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid.
[in]enumHandlerPointer to a FSPDF_ENUMPAGESIZEHANDLER structure which is a page size enumeration handler.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_DATANOTREADY if the data of parameter document is not available, or page data in PDF file is not available.
FSCRT_ERRCODE_PARAM if the parameter document enumHandler or FSPDF_ENUMPAGESIZEHANDLER::EnumPageSize of enumHandler is NULL.
FSCRT_ERRCODE_INVALIDTYPE if the parameter document is not a valid PDF document type.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_DATANOTREADY if there are not available data for ASYNC documents.
FSCRT_ERRCODE_ERROR if failing to enumerate sizes of all pages because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • document: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Doc_SetActionHandler ( FSCRT_DOCUMENT  document,
FSPDF_ACTION_HANDLER actionHandler 
)

Set the action handler to the PDF document.

Deprecated:
Current function has been deprecated since Foxit PDF SDK 4.5. So, not recommend to use current function any more. User can use function FSPDF_Doc_SetJavaScriptActionHandler instead.

Some interaction features such as performing JavaScript actions or filling the form, would require caller to implement the callback functions of action handler, in order to function well.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid.
[in]actionHandlerPointer to a FSPDF_ACTION_HANDLER structure.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if the parameter document or actionHandler is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if the parameter document is not a valid PDF document type.
FSCRT_ERRCODE_HANDLER if FSPDF_ACTION_HANDLER::InvalidateRect of parameter actionHandler is NULL
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_TextPage_GetNextCharIndexByDirection ( FSPDF_TEXTPAGE  textPage,
FS_INT32  curIndex,
FS_INT32  direction,
FS_INT32 nextIndex 
)

Get index of next character of a specific character in a specific direction.

Deprecated:
Current function has been deprecated since Foxit PDF SDK 4.3. So, not recommend to use current function any more.
Parameters
[in]textPageHandle to a FSPDF_TEXTPAGE object returned by function FSPDF_TextPage_Load.
[in]curIndexA zero-based index for current character. Range: from 0 to (charcount - 1).charcount is returned by function FSPDF_TextPage_CountChars.
[in]directionIndicates the direction to get the next character. Please refer to macro definitions FSPDF_TEXTDIRECTION_XXX and this should be one of these macros.
[out]nextIndexPointer to a FS_INT32 object that receives a zero-based index for the next character.
The meaning of some special return values for errors are:
  • -1 : reach the beginning of the page
  • -2 : reach the end of the page
  • -3 : other error
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter textPage or nextIndex is a NULL pointer, or direction is invalid.
FSCRT_ERRCODE_NOTFOUND if parameter curIndex is out of range, or no next character is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the function cannot get the index of character by direction because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • textPage: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation