FDF Document

Definitions for access to FDF document.
Definitions and functions in this module are included in ffdf_document_r.h and ffdf_document_w.h.
Module: FDFDocument
License Identifier: FDFDocument/All
Available License Right: Reading/Writing
For License Right Reading, see ffdf_document_r.h.
For License Right Writing, see ffdf_document_w.h.
More...

Functions

FS_RESULT FSFDF_Doc_Load (FSCRT_FILE fdfFile, FSCRT_DOCUMENT *fdfDoc)
 Load a FDF document. More...
 
FS_RESULT FSFDF_Doc_Close (FSCRT_DOCUMENT fdfDoc)
 Close a FDF document. More...
 
FS_RESULT FSFDF_Doc_GetPDFPath (FSCRT_DOCUMENT fdfDoc, FSCRT_BSTR *pdfPath)
 Get the path of PDF document from FDF document in UTF-8 string. More...
 
FS_RESULT FSFDF_Annot_GetCount (FSCRT_DOCUMENT fdfDoc, const FSCRT_BSTR *filter, FS_INT32 *count)
 Count annotations in a FDF document by specific filter. More...
 
FS_RESULT FSFDF_Annot_Get (FSCRT_DOCUMENT fdfDoc, const FSCRT_BSTR *filter, FS_INT32 index, FSCRT_ANNOT *fdfAnnot)
 Get an annotation from FDF document by specific filter and index. More...
 
FS_RESULT FSFDF_Annot_GetPageIndex (FSCRT_ANNOT fdfAnnot, FS_INT32 *pageIndex)
 Get the ordinal PDF page index, on which the FDF annotation should appear. More...
 
FS_RESULT FSFDF_Doc_Create (FS_INT32 format, FSCRT_DOCUMENT *fdfDoc)
 Create a new FDF document. More...
 
FS_RESULT FSFDF_Doc_Save (FSCRT_DOCUMENT fdfDoc, FSCRT_FILE fdfFile)
 Save a FDF document. More...
 
FS_RESULT FSFDF_Doc_SetPDFPath (FSCRT_DOCUMENT fdfDoc, const FSCRT_BSTR *pdfPath)
 Set the path of PDF document to FDF document. It is a UTF-8 string. More...
 
FS_RESULT FSPDF_Annot_ExportToFDFDoc (FSCRT_ANNOT pdfAnnot, FSCRT_DOCUMENT fdfDoc)
 Export a PDF annotation into a FDF document. More...
 
FS_RESULT FSFDF_Annot_ExportToPDFPage (FSCRT_ANNOT fdfAnnot, FSCRT_PAGE pdfPage, FSCRT_ANNOT *pdfAnnot)
 Export an annotation object loaded from a FDF document into a PDF page. More...
 
FS_RESULT FSPDF_Doc_ExportAnnotsToFDFDoc (FSCRT_DOCUMENT pdfDoc, FSCRT_DOCUMENT fdfDoc)
 Export all annotations from a PDF document into a FDF document. More...
 
FS_RESULT FSFDF_Doc_ExportAnnotsToPDFDoc (FSCRT_DOCUMENT fdfDoc, FSCRT_DOCUMENT pdfDoc)
 Export all annotations from a FDF document into a PDF document. More...
 

Detailed Description

Definitions for access to FDF document.
Definitions and functions in this module are included in ffdf_document_r.h and ffdf_document_w.h.
Module: FDFDocument
License Identifier: FDFDocument/All
Available License Right: Reading/Writing
For License Right Reading, see ffdf_document_r.h.
For License Right Writing, see ffdf_document_w.h.

This module contains following features:

Function Documentation

FS_RESULT FSFDF_Annot_ExportToPDFPage ( FSCRT_ANNOT  fdfAnnot,
FSCRT_PAGE  pdfPage,
FSCRT_ANNOT *  pdfAnnot 
)

Export an annotation object loaded from a FDF document into a PDF page.

Currently, it can support traditional FDF document format.

This function only support following annotation types: FSPDF_ANNOTTYPE_TEXT, FSPDF_ANNOTTYPE_FREETEXT, FSPDF_ANNOTTYPE_LINE, FSPDF_ANNOTTYPE_SQUARE, FSPDF_ANNOTTYPE_CIRCLE, FSPDF_ANNOTTYPE_POLYGON, FSPDF_ANNOTTYPE_POLYLINE, FSPDF_ANNOTTYPE_HIGHLIGHT, FSPDF_ANNOTTYPE_UNDERLINE, FSPDF_ANNOTTYPE_SQUIGGLY, FSPDF_ANNOTTYPE_STRIKEOUT, FSPDF_ANNOTTYPE_STAMP, FSPDF_ANNOTTYPE_CARET, FSPDF_ANNOTTYPE_INK, FSPDF_ANNOTTYPE_FILEATTACHMENT.

Parameters
[in]fdfAnnotHandle to a FSCRT_ANNOT object loaded from a FDF document.
[in]pdfPageHandle to a FSCRT_PAGE object which is a PDF page object.
[out]pdfAnnotPointer to a FSCRT_ANNOT handle that receives specific annotation in PDF page. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfAnnot, pdfPage, or annotIndex is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfAnnot is not a valid FDF annotation or pdfPage is not a valid PDF page, or the annotation is not markup.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if FDF annotation cannot be imported to PDF page because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If the annotation contains a pop-up annotation, the pop-up annotation will be also imported along in the meantime, but it could not be imported separately.
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 short-term.
  • fdfAnnot: this handle is short-term.
  • pdfPage: this handle is long-term partially recoverable.
  • pdfAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Annot_Get ( FSCRT_DOCUMENT  fdfDoc,
const FSCRT_BSTR filter,
FS_INT32  index,
FSCRT_ANNOT *  fdfAnnot 
)

Get an annotation from FDF document by specific filter and index.

Currently, it can only support traditional FDF document formats.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]filterPointer to a filter string.
If it is NULL or filter->str is NULL or filter->len is less than 1, this function will get all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation types:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[in]indexA zero-based annotation index based on the annotations which are specified by filter.
[out]fdfAnnotPointer to a FSCRT_ANNOT handle that receives the annotation from FDF file. This annotation can be used in function FSFDF_Annot_ExportToPDFPage. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or fdfAnnot is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_UNSUPPORTED if the type of parameter fdfDoc is not FSCRT_DOCUMENTTYPE_FDF.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or there are no annotations which are specified by filter.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if annotation cannot be obtained from FDF document 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.
  • fdfDoc: this handle is long-term partially recoverable.
  • fdfAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Annot_GetCount ( FSCRT_DOCUMENT  fdfDoc,
const FSCRT_BSTR filter,
FS_INT32 count 
)

Count annotations in a FDF document by specific filter.

Currently, it can only support traditional FDF document formats.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]filterPointer to a filter string.
If it is NULL or filter->str is NULL or filter->len is less than 1, this function will count all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation types:
  • For single type filter: please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: use comma to separate different types, for example, "Text, Link, Circle".
[out]countPointer to a FS_INT32 object that receives the count of annotations. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or count is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_UNSUPPORTED if the type of parameter fdfDoc is not FSCRT_DOCUMENTTYPE_FDF.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
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.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Annot_GetPageIndex ( FSCRT_ANNOT  fdfAnnot,
FS_INT32 pageIndex 
)

Get the ordinal PDF page index, on which the FDF annotation should appear.

Currently, it can only support traditional FDF document formats.

Parameters
[in]fdfAnnotHandle to a FSCRT_ANNOT object loaded from an FDF document.
[out]pageIndexPointer to a FS_INT32 object that receives the original PDF page index which starts from 0. If there is any error, it will be set -1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfAnnot or pageIndex is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfAnnot is not a valid FDF annotation.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if annotation cannot be obtained from FDF document 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 short-term.
  • fdfAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_Close ( FSCRT_DOCUMENT  fdfDoc)

Close a FDF document.

Currently, it can support traditional FDF and XFDF document formats.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
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.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_Create ( FS_INT32  format,
FSCRT_DOCUMENT *  fdfDoc 
)

Create a new FDF document.

Currently, it can support traditional FDF and XFDF files format.

Parameters
[in]formatFDF document format type. Currently, FSCRT_DOCUMENTTYPE_FDF and FSCRT_DOCUMENTTYPE_XFDF is supported.
[out]fdfDocPointer to a FSCRT_DOCUMENT handle that receives a FDF document. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to FDF document is not allowed.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_INVALIDTYPE if parameter format is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if FDF document cannot be created 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 recoverable.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_ExportAnnotsToPDFDoc ( FSCRT_DOCUMENT  fdfDoc,
FSCRT_DOCUMENT  pdfDoc 
)

Export all annotations from a FDF document into a PDF document.

Currently, it can support traditional FDF and XFDF files format.

This function only support following annotation types:
FSPDF_ANNOTTYPE_TEXT, FSPDF_ANNOTTYPE_FREETEXT, FSPDF_ANNOTTYPE_LINE, FSPDF_ANNOTTYPE_SQUARE, FSPDF_ANNOTTYPE_CIRCLE, FSPDF_ANNOTTYPE_POLYGON, FSPDF_ANNOTTYPE_POLYLINE, FSPDF_ANNOTTYPE_HIGHLIGHT, FSPDF_ANNOTTYPE_UNDERLINE, FSPDF_ANNOTTYPE_SQUIGGLY, FSPDF_ANNOTTYPE_STRIKEOUT, FSPDF_ANNOTTYPE_STAMP, FSPDF_ANNOTTYPE_CARET, FSPDF_ANNOTTYPE_INK, FSPDF_ANNOTTYPE_FILEATTACHMENT.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]pdfDocHandle to a FSCRT_DOCUMENT object which is a PDF document object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or pdfDoc is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document, or pdfDoc is not a valid PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to FDF document is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if any other error.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
  • When call this function, annotations of any page should not be loaded.
  • If the original PDF page index(on which the annotation should appear) in FDF document is out of the page range of the PDF document, the annotation will not be exported into PDF document.
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.
  • fdfDoc: this handle is long-term partially recoverable.
  • pdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_GetPDFPath ( FSCRT_DOCUMENT  fdfDoc,
FSCRT_BSTR pdfPath 
)

Get the path of PDF document from FDF document in UTF-8 string.

The path can be either an absolute one, or a relative one.
This function applies to FSCRT_DOCUMENTTYPE_FDF document, which contains elements required to export or import interactive form data. Currently, it can support traditional FDF and XFDF document formats.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]pdfPathPointer to a const UTF-8 path string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or pdfPath is NULL or pdfPath->str is NULL or pdfPath->len is less than 1.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_NOTFOUND if there is no path data found in FDF document.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
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.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_Load ( FSCRT_FILE  fdfFile,
FSCRT_DOCUMENT *  fdfDoc 
)

Load a FDF document.

Currently, it can support traditional FDF and XFDF file formats.

Parameters
[in]fdfFileHandle to a FSCRT_FILE object which is a file object to be loaded.
[out]fdfDocPointer to a FSCRT_DOCUMENT handle that receives a FDF document. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfFile or fdfDoc is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to FDF document is not allowed.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_FORMAT if parameter fdfFile is not a FDF or XFDF file.
FSCRT_ERRCODE_FILE if data from parameter fdfFile cannot be read.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if cannot load FDF document 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 recoverable.
  • fdfFile: this handle is long-term recoverable.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_Save ( FSCRT_DOCUMENT  fdfDoc,
FSCRT_FILE  fdfFile 
)

Save a FDF document.

Currently, it can support traditional FDF and XFDF files format.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]fdfFileHandle to a FSCRT_FILE object to which fdfDoc is to be saved.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or fdfFile is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_FILE if data cannot be written into fdfFile.
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.
  • fdfDoc: this handle is long-term partially recoverable.
  • fdfFile: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSFDF_Doc_SetPDFPath ( FSCRT_DOCUMENT  fdfDoc,
const FSCRT_BSTR pdfPath 
)

Set the path of PDF document to FDF document. It is a UTF-8 string.

The path can be either an absolute one, or a relative one.
The function applies to the FSCRT_DOCUMENTTYPE_FDF document, which contains elements required to export or import interactive form data. Currently, it can support traditional FDF and XFDF files format.

Parameters
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
[in]pdfPathA FSCRT_BSTR pointer to a const path UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter fdfDoc or pdfPath is NULL or pdfPath->str is NULL or pdfPath->len is less than 1.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
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.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_ExportToFDFDoc ( FSCRT_ANNOT  pdfAnnot,
FSCRT_DOCUMENT  fdfDoc 
)

Export a PDF annotation into a FDF document.

Currently, it can only support traditional FDF document format.

This function only support following annotation types: FSPDF_ANNOTTYPE_TEXT, FSPDF_ANNOTTYPE_FREETEXT, FSPDF_ANNOTTYPE_LINE, FSPDF_ANNOTTYPE_SQUARE, FSPDF_ANNOTTYPE_CIRCLE, FSPDF_ANNOTTYPE_POLYGON, FSPDF_ANNOTTYPE_POLYLINE, FSPDF_ANNOTTYPE_HIGHLIGHT, FSPDF_ANNOTTYPE_UNDERLINE, FSPDF_ANNOTTYPE_SQUIGGLY, FSPDF_ANNOTTYPE_STRIKEOUT, FSPDF_ANNOTTYPE_STAMP, FSPDF_ANNOTTYPE_CARET, FSPDF_ANNOTTYPE_INK, FSPDF_ANNOTTYPE_FILEATTACHMENT.

Parameters
[in]pdfAnnotHandle to a FSCRT_ANNOT object in a PDF page.
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfAnnot or fdfDoc is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter pdfAnnot is not a valid PDF annotation, or fdfDoc is not a valid FDF document, or the annotation is not markup.
FSCRT_ERRCODE_UNSUPPORTED if the type of parameter fdfDoc is not FSCRT_DOCUMENTTYPE_FDF.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If the annotation contains a pop-up annotation, the pop-up annotation will be also exported along in the meantime, but it could not be exported separately.
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 short-term.
  • pdfAnnot: this handle is short-term.
  • fdfDoc: 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_ExportAnnotsToFDFDoc ( FSCRT_DOCUMENT  pdfDoc,
FSCRT_DOCUMENT  fdfDoc 
)

Export all annotations from a PDF document into a FDF document.

Currently, it can support traditional FDF and XFDF files format.

This function only support following annotation types:
FSPDF_ANNOTTYPE_TEXT, FSPDF_ANNOTTYPE_FREETEXT, FSPDF_ANNOTTYPE_LINE, FSPDF_ANNOTTYPE_SQUARE, FSPDF_ANNOTTYPE_CIRCLE, FSPDF_ANNOTTYPE_POLYGON, FSPDF_ANNOTTYPE_POLYLINE, FSPDF_ANNOTTYPE_HIGHLIGHT, FSPDF_ANNOTTYPE_UNDERLINE, FSPDF_ANNOTTYPE_SQUIGGLY, FSPDF_ANNOTTYPE_STRIKEOUT, FSPDF_ANNOTTYPE_STAMP, FSPDF_ANNOTTYPE_CARET, FSPDF_ANNOTTYPE_INK, FSPDF_ANNOTTYPE_FILEATTACHMENT.

Parameters
[in]pdfDocHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfDoc or fdfDoc is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter pdfDoc is not a valid PDF document, or fdfDoc is not a valid FDF document.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to FDF document is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if any other error.
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.
  • pdfDoc: this handle is long-term partially recoverable.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation