TableToPDF Module

Types

A3DPDFTableData

Functions

A3D_API_DEPRECATED

Detailed Description

group a3d_pdf_tabletopdf_module

Module to create tables on a PDF page, based on html/css definition.

Deprecated:

This module will be deprecated with HP 2024.2.0. Please use Table From API Module Module instead. This will be removed in version 2026.1.0.

This module describes the functions and structures that allow you to define tables on a PDF page, based on html/css definition. 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 ../_images/sampletable.png

is defined with HOOPS Publish by specifying the members of A3DPDFTableData :

The member A3DPDFTableData::m_pcHtmlTable member takes the following value:

<table class="gridtable">
<tr>
    <th>Name</th><th>City</th><th>Age</th>
</tr>
<tr>
    <td>Bob</td><td>Seattle</td><td>35</td>
</tr>
<tr>
    <td>Sandy</td><td>New York</td><td>32</td>
</tr>
</table>

The member A3DPDFTableData::m_pcHtmlStyle member takes the following value:

<style type="text/css">
table.gridtable {
    font-family: helvetica;
    font-size:11pt;
    border-width: 1pt;
    border-collapse: collapse;
}
table.gridtable th {
    border-width: 1pt;
    border-style: solid;
    background-color: #dedede;
    padding: 8pt;
}
table.gridtable td {
    border-width: 1pt;
    border-style: solid;
    background-color: #ffffff;
    padding: 8pt;
}
</style>

Function Documentation

Warning

doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^