Module to create tables on a PDF page. More...
Data Structures | |
struct | A3DPDFTableData |
Structure to define a table. More... | |
Functions | |
A3DStatus | A3DPDFTableCreate (A3DPDFDocument *pDoc, const A3DPDFTableData *pTableData, A3DPDFTable **ppTable) |
Function to create a table on a PDF page. More... | |
Module to create tables on a PDF page.
This module describes the functions and structures that allow you to define tables on a PDF page. The table implementation uses an add-on to HOOPS Publish (TableToPDF) which is provided for free by Tech Soft 3D. The add-on is using components that are licensed under GNU LGPL terms. Consequently, the usage of tables using HOOPS Publish add-on requires our customer's application to comply with LGPL requirements. TableToPDF can be downloaded at http://developer.techsoft3d.com/add-ons/tabletopdf/ The deployment process is simple and just requires to copy the provided DLLs in HOOPS Publish binaries folder.
With HOOPS Publish, tables are defined in a HTML format using the function A3DPDFTableCreate. Two parameters define the table: the table content definition, as well as a style definition. Then, the table is positioned on the PDF page using the function A3DPDFPageInsertTable.
The HTML and style definition is out of the scope of this guide. HOOPS Publish and TableToPDF support the latest HTML5 and CSS3 specifications which are widely documented on the Internet. A lot of guides and samples can be consulted.
As an example, the following simple table
is defined with HOOPS Publish by specifying the members of A3DPDFTableData :
The member A3DPDFTableData::m_pcHtmlTable member takes the following value:
The member A3DPDFTableData::m_pcHtmlStyle member takes the following value:
A3DStatus A3DPDFTableCreate | ( | A3DPDFDocument * | pDoc, |
const A3DPDFTableData * | pTableData, | ||
A3DPDFTable ** | ppTable | ||
) |
Function to create a table on a PDF page.
The table object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertTable. WARNING: the initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function. Also, the binaries of the free add-on TableToPDF must have been copied in the same directory as HOOPS Publish binaries.
[in,out] | pDoc | The Document object to work with. |
[in] | pTableData | The table parameters. |
[out] | ppTable | The Table object created. |