< Home

< Programming Guide

< Supported File Formats

REFERENCE MANUAL

Data Structures | Modules | Functions
Document Module

Document functions. More...

Data Structures

struct  A3DPDFDocumentInformationData
 A3DPDFDocumentInformationData structure. More...
 
struct  A3DPDFButtonData
 Structure to define a button field. More...
 
struct  A3DPDFTextFieldData
 Structure to define a text field. More...
 
struct  A3DPDFCheckBoxData
 Structure to define a check box field. More...
 
struct  A3DPDFRadioButtonData
 Structure to define a radio button field. More...
 
struct  A3DPDFListBoxData
 Structure to define a list box field. More...
 
struct  A3DPDFDropDownListData
 Structure to define a drop down list field (combo box) More...
 
struct  A3DPDFDigitalSignatureData
 Structure to define a digital signature field. More...
 

Modules

 Bit Field to indicate the document permissions.
 

Functions

A3DStatus A3DPDFDocumentCreateEmpty (A3DPDFDocument **ppDoc)
 Function to create an empty PDF document. More...
 
A3DStatus A3DPDFDocumentCreateFromPDFFile (const A3DUTF8Char *pcFileName, A3DPDFDocument **ppDoc)
 Function to create a document from a PDF file. More...
 
A3DStatus A3DPDFDocumentCreateUniquePage (A3DPDFDocument *pDoc, const A3DPDFPageData *pPageData, A3DPDFPage **ppPage)
 This method was deprecated in HOOPS Publish 1.10. Use A3DPDFDocumentAppendNewPage instead. More...
 
A3DStatus A3DPDFDocumentCreateUniquePage2 (A3DPDFDocument *pDoc, const A3DPDFPageData2 *pPageData, A3DPDFPage **ppPage)
 This function adds a unique page to an empty PDF document. This function can only be used on a file opened with A3DPDFDocumentCreateEmpty. It can't be used on a file which already contains a page. More...
 
A3DStatus A3DPDFDocumentGetUniquePage (const A3DPDFDocument *pDoc, A3DPDFPage **ppPage)
 Function to get the unique page of the document. More...
 
A3DStatus A3DPDFDocumentGetNumberPages (const A3DPDFDocument *pDoc, A3DInt32 *piNbPages)
 Function to get the number of pages in the document. More...
 
A3DStatus A3DPDFDocumentGetPage (const A3DPDFDocument *pDoc, const A3DInt32 iNumPage, A3DPDFPage **ppPage)
 Function to get a page in the document. More...
 
A3DStatus A3DPDFDocumentRemovePages (const A3DPDFDocument *pDoc, const A3DInt32 iFirstPage, const A3DInt32 iLastPage)
 Function to remove pages in the document. More...
 
A3DStatus A3DPDFDocumentAppendNewPage (A3DPDFDocument *pDoc, const A3DPDFPageData *pPageData, A3DPDFPage **ppPage)
 Appends a new empty page to a document. More...
 
A3DStatus A3DPDFDocumentAppendNewPage2 (A3DPDFDocument *pDoc, const A3DPDFPageData2 *pPageData, A3DPDFPage **ppPage)
 Appends a new empty page to a document. More...
 
A3DStatus A3DPDFDocumentAppendPageFromPDFFile (A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, A3DPDFPage **ppPage)
 Superseded by A3DPDFDocumentAppendPageFromPDFFileEx in A3DLIBS 4.3 and later. More...
 
A3DStatus A3DPDFDocumentAppendPageFromPDFFileEx (A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DBool bRenameFields, A3DPDFPage **ppPage)
 
A3DStatus A3DPDFDocumentSetInformation (A3DPDFDocument *pDoc, const A3DPDFDocumentInformationData *pInformationData)
 Function to set information on the document. These information are visible in the Adobe Reader on the File Properties menu. More...
 
A3DStatus A3DPDFDocumentSetPassword (A3DPDFDocument *pDoc, const A3DUTF8Char *pcUserPassword, const A3DUTF8Char *pcOwnerPassword)
 Function to add user and owner passwords on a document. More...
 
A3DStatus A3DPDFDocumentSetDocumentPermissions (A3DPDFDocument *pDoc, int iPermissions)
 Function to set permissions on a document. More...
 
A3DStatus A3DPDFDocumentAddImageAsIcon (A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)
 Function to store an image in the PDF file in a way it can be used as an icon for PDF fields. More...
 
A3DStatus A3DPDFDocumentAddFileAttachment (A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DUTF8Char *pcDescription)
 Function to attach a file to the document. Attachments are visible on the Adobe Reader with the specific navigation pane. In Adobe Reader X version, the Attachments pane can be activated with the menu View / Show/Hide / Navigation Panes / Attachments. More...
 
A3DStatus A3DPDFDocumentAddJavascriptFromString (A3DPDFDocument *pDoc, const A3DUTF8Char *pcScriptName, const A3DUTF8Char *pcJavascriptString)
 Adds a JavaScript to a document. This JavaScript is launched when the file is opened. More...
 
A3DStatus A3DPDFDocumentClose (A3DPDFDocument *pDoc)
 Function to close the document and free all memory. More...
 
A3DStatus A3DPDFDefineViewCarousel (A3DPDFDocument *pDoc, A3DPDFPage *pPage, A3DPDF3DAnnot *pAnnot, A3DAsmModelFile *pModelFile, A3DInt32 iNumberOfButtons, A3DUTF8Char **ppButtonsNames, A3DUTF8Char *pPreviousButtonName, A3DUTF8Char *pNextButtonName, A3DInt32 iNumberOfViews, A3DPDFView **ppViews, A3DPDFImage **ppImages, A3DInt32 iScrollStep)
 Function to create a 'standard' view carousel and position it in the PDF document. The PDF document must contain the buttons for the views and the buttons to go to the next and the previous view. More...
 
A3DStatus A3DPDFDefineSlideTable (A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DUTF8Char *pcHtmlFrameTable, A3DUTF8Char *pcHtmlFrameStyle, A3DUTF8Char *pPreviousButtonName, A3DUTF8Char *pNextButtonName, A3DInt32 iNbTextRows, A3DInt32 iNbTextCols, A3DPDFTextField ***ppTexts, A3DBool bHasHeader)
 Function to create a slide table. This is a table with a fixed size, and two buttons to scroll the rows of the table. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row. The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format. More...
 
A3DStatus A3DPDFDefineSlideTable2 (A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DUTF8Char *pcHtmlFrameTable, A3DUTF8Char *pcHtmlFrameStyle, A3DInt32 iSliderWidth, A3DInt32 iNbTextRows, A3DInt32 iNbTextCols, A3DPDFTextField ***ppTexts, A3DBool bHasHeader, A3DUTF8Char **ppcSTName)
 Function to create a slide table. This is a table with a fixed size, and a scroll bar to scroll the rows of the table. This function differs from A3DPDFDefineSlideTable in that it uses a scroll bar to scroll the rows instead of previous and next buttons. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row. The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format. More...
 
A3DStatus A3DPDFDocumentSave (A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName)
 Function to save the PDF document. More...
 

Detailed Description

Document functions.

This module describes the functions and structures that allow you to define a PDF Document.

Function Documentation

A3DStatus A3DPDFDocumentCreateEmpty ( A3DPDFDocument **  ppDoc)

Function to create an empty PDF document.

This function creates a document with no page. Subsequently, some pages must be added with the append functions A3DPDFDocumentAppendNewPage or A3DPDFDocumentAppendPageFromPDFFile.

Parameters
[out]ppDocThe document created.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentCreateFromPDFFile ( const A3DUTF8Char pcFileName,
A3DPDFDocument **  ppDoc 
)

Function to create a document from a PDF file.

This function creates a document from a PDF input file. Starting with HOOPS Publish 6.0 the input PDF can contain several pages. Pages can be added to the document with append functions A3DPDFDocumentAppendNewPage or A3DPDFDocumentAppendPageFromPDFFileEx.

Parameters
[in]pcFileNameThe input file name.
[out]ppDocThe document created.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentCreateUniquePage ( A3DPDFDocument pDoc,
const A3DPDFPageData pPageData,
A3DPDFPage **  ppPage 
)

This method was deprecated in HOOPS Publish 1.10. Use A3DPDFDocumentAppendNewPage instead.

This function adds a unique page to an empty PDF document. This function can only be used on a file opened with A3DPDFDocumentCreateEmpty. It can't be used on a file which already contains a page.

Parameters
[in,out]pDocThe current document on which the new page will be added.
[in]pPageDataThe page data parameters.
[out]ppPageThe newly-created page.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentCreateUniquePage2 ( A3DPDFDocument pDoc,
const A3DPDFPageData2 pPageData,
A3DPDFPage **  ppPage 
)

This function adds a unique page to an empty PDF document. This function can only be used on a file opened with A3DPDFDocumentCreateEmpty. It can't be used on a file which already contains a page.

Parameters
[in,out]pDocThe current document on which the new page will be added.
[in]pPageDataThe page data parameters.
[out]ppPageThe newly-created page.
Returns
A3D_SUCCESS
Version
7.2
A3DStatus A3DPDFDocumentGetUniquePage ( const A3DPDFDocument pDoc,
A3DPDFPage **  ppPage 
)

Function to get the unique page of the document.

This method was deprecated in HOOPS Publish 6.0. Use A3DPDFDocumentGetPage instead.

This function only works on a document which contains a single page. It is designed to be called after A3DPDFDocumentCreateFromPDFFile to get the Page object.

Parameters
[in]pDocThe Document object to work with.
[out]ppPageThe Page object.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentGetNumberPages ( const A3DPDFDocument pDoc,
A3DInt32 piNbPages 
)

Function to get the number of pages in the document.

Parameters
[in]pDocThe Document object to work with.
[out]piNbPagesThe number of pages. Remember to subtract 1 from this value if you are going to pass it to a method that takes a zero-based page number.
Returns
A3D_SUCCESS
Version
6.0
A3DStatus A3DPDFDocumentGetPage ( const A3DPDFDocument pDoc,
const A3DInt32  iNumPage,
A3DPDFPage **  ppPage 
)

Function to get a page in the document.

Parameters
[in]pDocThe Document object to work with.
[in]iNumPageThe index of the page. The first page is 0.
[out]ppPageThe Page object.
Returns
A3D_SUCCESS
Version
6.0
A3DStatus A3DPDFDocumentRemovePages ( const A3DPDFDocument pDoc,
const A3DInt32  iFirstPage,
const A3DInt32  iLastPage 
)

Function to remove pages in the document.

Parameters
[in,out]pDocThe Document object to work with.
[in]iFirstPageThe index of the first page to remove. The first page is 0.
[in]iLastPageThe index of the last page to remove.
Returns
A3D_SUCCESS
Version
6.0
A3DStatus A3DPDFDocumentAppendNewPage ( A3DPDFDocument pDoc,
const A3DPDFPageData pPageData,
A3DPDFPage **  ppPage 
)

Appends a new empty page to a document.

The page is added at the end of the document. It is a new page created with the options set in the pPageData argument.

Parameters
[in,out]pDocThe Document object to work with.
[in]pPageDataThe page parameters.
[out]ppPageThe Page object for the new page.
Returns
A3D_SUCCESS
Version
4.2
A3DStatus A3DPDFDocumentAppendNewPage2 ( A3DPDFDocument pDoc,
const A3DPDFPageData2 pPageData,
A3DPDFPage **  ppPage 
)

Appends a new empty page to a document.

The page is added at the end of the document. It is a new page created with the options set in the pPageData argument.

Parameters
[in,out]pDocThe Document object to work with.
[in]pPageDataThe page parameters.
[out]ppPageThe Page object for the new page.
Returns
A3D_SUCCESS
Version
7.2
A3DStatus A3DPDFDocumentAppendPageFromPDFFile ( A3DPDFDocument pDoc,
const A3DUTF8Char pcFileName,
A3DPDFPage **  ppPage 
)

Superseded by A3DPDFDocumentAppendPageFromPDFFileEx in A3DLIBS 4.3 and later.

Appends new pages from a PDF template to a document. Starting with HOOPS Publish 6.0 the input PDF can contain several pages. The pages are added at the end of the document. All pages are copied from the PDF template file specified with the pcFileName argument. If the imported pages contain form fields with names that already exist on other pages of the document, the function will fail. In this situation, use A3DPDFDocumentAppendPageFromPDFFileEx to rename all form fields of the imported pages.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcFileNameThe input file name of the PDF template.
[out]ppPageThe Page object for the last page inserted.
Returns
A3D_SUCCESS
Version
4.2
A3DStatus A3DPDFDocumentAppendPageFromPDFFileEx ( A3DPDFDocument pDoc,
const A3DUTF8Char pcFileName,
const A3DBool  bRenameFields,
A3DPDFPage **  ppPage 
)

Appends new pages from a PDF template to a document, with the possibility to rename all form fields to avoid PDF conflicts. This method supersedes A3DPDFDocumentAppendPageFromPDFFile() in A3DLIBS 4.3 and later. Starting from HOOPS Publish 6.0 the input PDF can contain several pages. The pages are added at the end of the document. All pages are copied from the PDF template file specified with the pcFileName argument. If the imported pages contain form fields with names that already exist on other pages of the document, the function will fail. In this situation, set the bRenameFields parameter to true to rename all form fields of the imported pages. Warning: all references to the renamed form fields have to be modified to reflect the new names. This has to be done for example for JavaScript code that could work with these fields.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcFileNameThe input file name of the PDF template.
[in]bRenameFieldsIf true, the form fields of the template pages are renamed, appending the position of the pages in the final document to every fields. Note that the index of the first page is 1. For example, a field 'MyTitle' will be renamed 'MyTitle_1" if the page is inserted as the first page of the document. If false, the form fields are not renamed and the function will fail if some fields already exist on the document with the same name.
[out]ppPageThe Page object for the last page inserted.
Returns
A3D_SUCCESS
Version
4.3
A3DStatus A3DPDFDocumentSetInformation ( A3DPDFDocument pDoc,
const A3DPDFDocumentInformationData pInformationData 
)

Function to set information on the document. These information are visible in the Adobe Reader on the File Properties menu.

Parameters
[in,out]pDocThe Document object to work with.
[in]pInformationDataThe information parameters.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentSetPassword ( A3DPDFDocument pDoc,
const A3DUTF8Char pcUserPassword,
const A3DUTF8Char pcOwnerPassword 
)

Function to add user and owner passwords on a document.

These passwords are natively supported by Adobe Reader. If a user password is specified, Adobe Reader will ask for a password when opening the document. The owner password is the password used to set document restrictions on the document. It does not restrict the opening of a PDF file, only what can be done once opened. Document restrictions can include printing, changing the document, document assembly, content copying, content copying for accessibility, page extraction, commenting, filling of form fields, signing, and creation of template pages.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcUserPasswordThe password to protect the document at opening. Also protects against document modification and printing. If an empty string is specified, no user password is required by Adobe Reader or Acrobat.
[in]pcOwnerPasswordLets you require a password when changing the security features of the PDF, not when opening it. If an empty string is specified, no password will be required in Acrobat to change security settings.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentSetDocumentPermissions ( A3DPDFDocument pDoc,
int  iPermissions 
)

Function to set permissions on a document.

Parameters
[in,out]pDocThe Document object to work with.
[in]iPermissionsThe permissions, composed of bit fields detailed in Bit Field to indicate the document permissions..
Returns
A3D_SUCCESS
Version
7.2
A3DStatus A3DPDFDocumentAddImageAsIcon ( A3DPDFDocument pDoc,
const A3DPDFImage pImage,
const A3DUTF8Char pcIconName 
)

Function to store an image in the PDF file in a way it can be used as an icon for PDF fields.

Stored in that way, the image can be dynamically retrieved by the Acrobat JavaScript document function 'getIcon'.
For example, if the function is called with A3DPDFDocumentAddImageAsIcon(pimage,"myicon"), then the following JavaScript code might be used on the document to dynamically set the icon on a button:
var but = this.getField("buttonfieldtopopulate");
var icon = this.getIcon("myicon");
but.buttonSetIcon(icon);
Parameters
[in,out]pDocThe Document object to work with.
[in]pcIconNameThe icon name that will be used to identify the image.
[in]pImageThe image.
Returns
A3D_SUCCESS
Version
6.1
A3DStatus A3DPDFDocumentAddFileAttachment ( A3DPDFDocument pDoc,
const A3DUTF8Char pcFileName,
const A3DUTF8Char pcDescription 
)

Function to attach a file to the document. Attachments are visible on the Adobe Reader with the specific navigation pane. In Adobe Reader X version, the Attachments pane can be activated with the menu View / Show/Hide / Navigation Panes / Attachments.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcFileNameThe name of the file to attach.
[in]pcDescriptionThe description of the attached file.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDocumentAddJavascriptFromString ( A3DPDFDocument pDoc,
const A3DUTF8Char pcScriptName,
const A3DUTF8Char pcJavascriptString 
)

Adds a JavaScript to a document. This JavaScript is launched when the file is opened.

Parameters
[in,out]pDocThe Document object to work with.
[in]pcScriptNameThe name of the script. It is not used by Acrobat but needs to be unique.
[in]pcJavascriptStringThe string which contains the JavaScript.
Returns
A3D_SUCCESS
Version
4.3
A3DStatus A3DPDFDocumentClose ( A3DPDFDocument pDoc)

Function to close the document and free all memory.

Parameters
[in,out]pDocThe Document object to work with.
Returns
A3D_SUCCESS
Version
4.1
A3DStatus A3DPDFDefineViewCarousel ( A3DPDFDocument pDoc,
A3DPDFPage pPage,
A3DPDF3DAnnot pAnnot,
A3DAsmModelFile pModelFile,
A3DInt32  iNumberOfButtons,
A3DUTF8Char **  ppButtonsNames,
A3DUTF8Char pPreviousButtonName,
A3DUTF8Char pNextButtonName,
A3DInt32  iNumberOfViews,
A3DPDFView **  ppViews,
A3DPDFImage **  ppImages,
A3DInt32  iScrollStep 
)

Function to create a 'standard' view carousel and position it in the PDF document. The PDF document must contain the buttons for the views and the buttons to go to the next and the previous view.

Parameters
[in,out]pDocThe document which will contain the carousel.
[in]pPageThe page where the carousel will be put.
[in]pAnnotThe annotation which contains the views of the carousel.
[in]pModelFileThe model file corresponding with the annotation.
[in]iNumberOfButtonsThe number of buttons in the ppButtonsNames array.
[in]ppButtonsNamesThe names of the view buttons in the pdf file. The size of this array should be iNumberOfButtonsRows*iNumberOfButtonsCols.
[in]pPreviousButtonNameThe name of the button to press to scroll the carousel to previous views.
[in]pNextButtonNameThe name of the button to press to scroll the carousel to next views.
[in]iNumberOfViewsIf equal to 0, all the views of the model file will be used, in the order they are found in the model file. If superior than 0, the number of the views of the next parameter.
[in]ppViewsIf NULL, all the views of the model file will be used. If not NULL, ppViews must contain the views that will be used for the carousel.
[in]ppImagesIf NULL, the images are automatically created from the views. If not NULL, ppImages must contain the images that will be used for the views. In that case, the size of the array should be the same as the size of ppViews parameter.
[in]iScrollStepThis is the number of buttons icons scrolled. If = iNumberOfButtons, the carousel scrolls the icons by page (all the icons are replaced in the carousel). If = the number of rows, the icons are scrolled by rows. If = the number of columns, the icons are scrolled by columns. If = 1, the carousel scrolls the icons one by one (all the icons are shifted of 1 increment in the carousel).
Returns
A3D_SUCCESS
Version
8.0
A3DStatus A3DPDFDefineSlideTable ( A3DPDFDocument pDoc,
A3DPDFPage pPage,
const A3DInt32  iPosLeft,
const A3DInt32  iPosTop,
A3DUTF8Char pcHtmlFrameTable,
A3DUTF8Char pcHtmlFrameStyle,
A3DUTF8Char pPreviousButtonName,
A3DUTF8Char pNextButtonName,
A3DInt32  iNbTextRows,
A3DInt32  iNbTextCols,
A3DPDFTextField ***  ppTexts,
A3DBool  bHasHeader 
)

Function to create a slide table. This is a table with a fixed size, and two buttons to scroll the rows of the table. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row. The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Parameters
[in,out]pDocThe document which will contain the slide table.
[in,out]pPageThe page where the slide table will be put.
[in]iPosLeftThe x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
[in]iPosTopThe y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
[in]pcHtmlFrameTableString for definition of the frame table in a HTML format. See example definition in Table Module.
[in]pcHtmlFrameStyleString for definition of the frame table style in a CSS format. See example definition in Table Module.
[in]pPreviousButtonNameThe name of the button to press to go to the previous page.
[in]pNextButtonNameThe name of the button to press to go to the next page.
[in]iNbTextRowsthe number of rows in the matrix of text data specified in ppTextData.
[in]iNbTextColsthe number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.
[in]ppTextsmust contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:
  • the text content is specified in member m_pcDefaultValue
  • the font name is specified in member m_pcFontName
  • the font size is specified in member m_iFontSize
  • the text color is specified in member m_sTextColor
  • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE
  • the text alignment is specified in member m_eTextAlignment
  • the text orientation is specified in member m_eTextOrientation
  • the readonly attribute is specified in member m_bReadOnly
  • the multiline attribute is specified in member m_bMultiLine
  • the donotscroll attribute is specified in member m_bDoNotScroll
  • the formfield attribute is specified in member m_eFormField
Only first row is used to get attributes.
[in]bHasHeaderIf true, the table header is described at first row of ppTexts. This row will remain visible and won't be scrolled when pushing the prev/next buttons. If false, the table is considered without header, then the whole rows will be scrolled when pushing the prev/next buttons.
Returns
A3D_SUCCESS
A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR if iNbTextCols differs from the number of columns in table frame.
A3DPDF_SLIDETABLE_TEXTDATA_ERROR if ppTexts has wrong data (typically null pointer).
Version
7.2
A3DStatus A3DPDFDefineSlideTable2 ( A3DPDFDocument pDoc,
A3DPDFPage pPage,
const A3DInt32  iPosLeft,
const A3DInt32  iPosTop,
A3DUTF8Char pcHtmlFrameTable,
A3DUTF8Char pcHtmlFrameStyle,
A3DInt32  iSliderWidth,
A3DInt32  iNbTextRows,
A3DInt32  iNbTextCols,
A3DPDFTextField ***  ppTexts,
A3DBool  bHasHeader,
A3DUTF8Char **  ppcSTName 
)

Function to create a slide table. This is a table with a fixed size, and a scroll bar to scroll the rows of the table. This function differs from A3DPDFDefineSlideTable in that it uses a scroll bar to scroll the rows instead of previous and next buttons. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row. The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Parameters
[in,out]pDocThe document which will contain the slide table.
[in,out]pPageThe page where the slide table will be put.
[in]iPosLeftThe x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
[in]iPosTopThe y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
[in]pcHtmlFrameTableString for definition of the frame table in a HTML format. See example definition in Table Module.
[in]pcHtmlFrameStyleString for definition of the frame table style in a CSS format. See example definition in Table Module.
[in]iSliderWidthThe width of the scroll bar (in points). Important: The scrollbar is positioned on the right of the table, outside of the frame.
[in]iNbTextRowsthe number of rows in the matrix of text data specified in ppTextData.
[in]iNbTextColsthe number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.
[in]ppTextsmust contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:
  • the text content is specified in member m_pcDefaultValue
  • the font name is specified in member m_pcFontName
  • the font size is specified in member m_iFontSize
  • the text color is specified in member m_sTextColor
  • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE
  • the text alignment is specified in member m_eTextAlignment
  • the text orientation is specified in member m_eTextOrientation
  • the readonly attribute is specified in member m_bReadOnly
  • the multiline attribute is specified in member m_bMultiLine
  • the donotscroll attribute is specified in member m_bDoNotScroll
  • the formfield attribute is specified in member m_eFormField
Only first row is used to get attributes.
[in]bHasHeaderIf true, the table header is described at first row of ppTexts. This row will remain visible and won't be scrolled when using the scroll bar. If false, the table is considered without header, then the whole rows will be scrolled when using the scroll bar.
[out]ppcSTNameThe identifier of the slide table as a string. It can be useful to add Javascript instructions to work on this specific slide table.
Returns
A3D_SUCCESS
A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR if iNbTextCols differs from the number of columns in table frame.
A3DPDF_SLIDETABLE_TEXTDATA_ERROR if ppTexts has wrong data (typically null pointer).
Version
8.1
A3DStatus A3DPDFDocumentSave ( A3DPDFDocument pDoc,
const A3DUTF8Char pcFileName 
)

Function to save the PDF document.

Parameters
[in]pDocThe Document object to save.
[in]pcFileNameThe file name where to save the document. The path (absolute or relative) must be provided (use ".\\" for the current directory).
Returns
A3D_SUCCESS
Version
4.1