Layer Module

Types

A3DPDFLayerData

Functions

A3DStatus

A3DPDFLayerCreate

A3DStatus

A3DPDFLayerGet

A3DStatus

A3DPDFDocumentGetNumberLayers

A3DStatus

A3DPDFDocumentGetLayer

A3DStatus

A3DPDFDocumentGetLayerByName

A3DStatus

A3DPDFDocumentSetLayersRBGroup

A3DStatus

A3DPDFFieldSetLayer

A3DStatus

A3DPDFImageSetLayer

A3DStatus

A3DPDFPageInsertTableAndSetLayer

A3DStatus

A3DPDFPageInsertTextAndSetLayer

A3DStatus

A3DPDFPageInsertScrollTableAndSetLayer

Detailed Description

group a3d_pdf_layer_module

(HOOPS Publish Advanced) Module to define PDF layers.

Function Documentation

A3DStatus A3DPDFLayerCreate(A3DPDFDocument *pDoc, const A3DPDFLayerData *pData, A3DPDFLayer **ppLayer)

Creates a layer in a document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • pData[in] The layer data parameters.

  • ppLayer[out] The newly-created layer.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFLayerGet(const A3DPDFLayer *pLayer, A3DPDFLayerData *pData)

Populates the A3DPDFLayerData structure with data from an A3DPDFLayer entity.

Version

10.1

Parameters
  • pLayer[in] The layer to determine data from.

  • pData[out] The layer data parameters.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetNumberLayers(const A3DPDFDocument *pDoc, A3DInt32 *piNbLayers)

Function to get the number of layers in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • piNbLayers[out] The number of layers in the document.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetLayer(const A3DPDFDocument *pDoc, const A3DInt32 iNumLayer, A3DPDFLayer **ppLayer)

Get a layer object by its index in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • iNumLayer[in] The index of the layer. The first index is 0.

  • ppLayer[out] The Layer object.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentGetLayerByName(const A3DPDFDocument *pDoc, const A3DUTF8Char *pcName, A3DPDFLayer **ppLayer)

Get a layer object by its name in the document.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • pcName[in] The name of the layer to look for.

  • ppLayer[out] The Layer object.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDocumentSetLayersRBGroup(const A3DPDFDocument *pDoc, A3DUns32 iNbLayers, A3DPDFLayer **ppLayers)

Define a “radio button” behaviour for a group of layers. That is, the state of at most one layer in the group can be activated at a time.

Version

10.1

Parameters
  • pDoc[in] The document to work with.

  • iNbLayers[in] The size of the following array of layers.

  • ppLayers[in] The array of pointer on layers objects.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFFieldSetLayer(A3DPDFField *pField, A3DPDFLayer *pLayer)

Adds a field into a layer.

Version

10.1

Parameters
  • pField[in] the field to be added

  • pLayer[in] The layer in which the field must be added.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFImageSetLayer(A3DPDFImage *pImage, A3DPDFLayer *pLayer)

Adds an image into a layer.

Version

10.1

Parameters
  • pImage[in] the image to be added

  • pLayer[in] The layer in which the image must be added.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertTableAndSetLayer(A3DPDFPage *pPage, A3DPDFTable *pTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DPDFLayer *pLayer)

Function to insert a table in a page within a layer.

Warning1: The positioning is not defined as in the other insertion functions (for texts or images). Here, the position is specified from the top of the page. Warning2: This function must be used instead of A3DPDFPageInsertTable if the table is to be placed in a layer.

Version

10.1

Parameters
  • pPage[inout] The Page object to work with.

  • pTable[in] The Table object to insert on the page.

  • iPosLeft[in] The 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.

  • iPosTop[in] The 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.

  • pLayer[in] The layer in which the table must be placed.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertTextAndSetLayer(A3DPDFPage *pPage, A3DPDFText *pText, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom, A3DPDFLayer *pLayer)

Function to insert a text line in a page within a layer.

Version

10.1

Warning

This function must be used instead of A3DPDFPageInsertText if the text is to be placed in a layer.

Parameters
  • pPage[inout] The Page object to work with.

  • pText[in] The Text object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosBottom[in] The y coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pLayer[in] The layer in which the text must be placed

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertScrollTableAndSetLayer(A3DPDFPage *pPage, A3DPDFScrollTable *pScrollTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, A3DPDFLayer *pLayer)

Function to insert a ScrollTable widget in a page.

Version

10.1

Parameters
  • pPage[inout] The Page object to work with.

  • pScrollTable[in] The ScrollTable object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pLayer[in] The layer in which the ScrollTable must be placed

Return values
  • A3D_SUCCESS

  • A3DPDF_CANNOT_INITIALIZE_RESOURCES – if the resources directory is not properly defined.

  • A3DPDF_CANNOT_LOAD_TABLETOPDF_DLL – if the tabletopdf dll cannot be loaded.

Returns

A3D_SUCCESS in case of success or an error code