pdfGetLayerName

Get the name of a layer.
char *pdfGetLayerName(PDFViewerHandle viewer, PDFLayerHandle layer, int *length)
This function returns the name of a layer. The returned value is a null-terminated string, and its length is also stored in *length.

The layer argument is an opaque layer handle, returned by pdfGetLayer.

The layer name is converted according to the current text encoding (see pdfSetTextEncoding).

The caller is responsible for freeing the name string after using it, by calling pdfFreeMemory.

C:
PDFLayerHandler layer; char *name; BOOL visible; int n, len, i; n = pdfGetNumLayers(viewer); for (i = 0; i < n; ++i) { layer = pdfGetLayer(viewer, i); name = pdfGetLayerName(viewer, layer, &len); visible = pdfGetLayerVisibility(viewer, layer); /* ... add a list entry using name and visible ... */ pdfFreeMemory(name); }
pdfGetNumLayers
pdfGetLayer
pdfGetLayerVisibility
pdfSetLayerVisibility
pdfGetLayerViewState
pdfGetLayerPrintState
pdfSetTextEncoding
pdfFreeMemory