Button Module
Fields
Functions
Detailed Description
- group a3d_pdffield_button
 Module to access and define Button field.
This module describes the functions and structures that allow you to define a Button. A Button is an Acrobat Field.
Type Documentation
- 
enum A3DPDFELayoutTextIcon
 Position of the label of the button relative to its icon.
- Version
 7.2
Values:
- 
enumerator kA3DPDFLabelOnly
 Only the label will be displayed.
- 
enumerator kA3DPDFIconOnly
 Only the icon will be displayed.
- 
enumerator kA3DPDFIconTopLabelBottom
 The label will be displayed below the icon.
- 
enumerator kA3DPDFLabelTopIconBottom
 The label will be displayed above the icon.
- 
enumerator kA3DPDFIconLeftLabelRight
 The label will be displayed to the right of the icon.
- 
enumerator kA3DPDFLabelLeftIconRight
 The label will be displayed to the left of the icon.
- 
enumerator kA3DPDFLabelOverIcon
 The label will be displayed on top of the icon.
Function Documentation
- 
A3DStatus A3DPDFButtonCreate(A3DPDFDocument *pDoc, const A3DPDFButtonData *pButtonData, A3DPDFButton **ppButton)
 Function to create a button.
The button is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertButton.
- Version
 7.2
- Parameters
 pDoc – [inout] The Document object to work with.
pButtonData – [in] The button parameters. The name is mandatory.
ppButton – [out] The button created.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFPageInsertButton(A3DPDFPage *pPage, A3DPDFButton *pButton, const A3DPDFRectData *pRectData)
 Function to insert a button in a page.
- Version
 7.2
- Parameters
 pPage – [inout] The Page object to work with.
pButton – [in] The button object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFPageInsertButtonInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFButton *pButton, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
 Function to insert a button in a table.
See also
- Version
 7.2
- Parameters
 pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pButton – [in] The Button object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the button (starts from 1).
iColumnIndex – [in] The index of the column of the table’s cell to insert the button (starts from 1).
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFPageFieldButtonSetLabel(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DUTF8Char *pcLabel)
 Function to set the label of a button form field.
- Version
 4.1
- Parameters
 pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the button form field. Only Acroform fields are supported.
pcLabel – [in] The label to set to the field.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFButtonSetLabel(A3DPDFButton *pButton, const A3DUTF8Char *pcLabel)
 Function to set the label of a button form field.
- Version
 10.0
- Parameters
 pButton – [inout] The Button object to work with.
pcLabel – [in] The label to set to the field.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFPageFieldButtonSetIcon(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DPDFImage *pImage)
 Function to set the icon of a button form field.
The image is defined from a A3DPDFImage object. It is always scaled non-proportionally, which means always adapted and stretched to the size of the field. That way, the members m_iWidth and m_iHeight of A3DPDFImageData are not used by this function.
- Version
 4.1
- Parameters
 pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the form field. Only Acroform fields are supported.
pImage – [in] The image to store on the button field.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code
- 
A3DStatus A3DPDFButtonSetIcon(A3DPDFButton *pButton, const A3DPDFImage *pImage)
 Function to set the icon of a button form field.
The image is defined from a A3DPDFImage object. It is always scaled non-proportionally, which means always adapted and stretched to the size of the field. That way, the members m_iWidth and m_iHeight of A3DPDFImageData are not used by this function.
- Version
 10.0
- Parameters
 pButton – [inout] The Button object to work with.
pImage – [in] The image to store on the button field.
- Return values
 A3D_SUCCESS –
- Returns
 A3D_SUCCESS in case of success or an error code