Appearance
Overview
The pdf-layers
component displays the layers of a PDF document, if any.
The document
property is used to identify the pdf-document
that provides the layers. The pagesviewer
property is used to identify the pdf-pages
component that should update when the user toggles layer visibility.
Usage
html
<!-- Define the PDF document -->
<pdf-document name="d" />
<!-- Define the PDF pages viewer -->
<pdf-pages document="d" name="p" pageMode="multi" />
<!-- Define the PDF layers component -->
<pdf-layers document="d" pagesviewer="p" />
In this example, a pdf-document
named "d" is defined. A pdf-pages
viewer named "p" is associated with this document. The pdf-layers
component is also associated with the same document and viewer, allowing the user to toggle the visibility of layers in the document.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
document | document | Reference for the PdfDocument | string | undefined | 'default' |
pagesviewer | pagesviewer | Identifies the PdfPages component by its 'name' property. | string | undefined | 'default' |
Built with StencilJS