Event Handling und Schnittstellen
Die einzelnen Komponenten arbeiten mit @Input
und @Output
s, wie bei Angular üblich. Über diese kann auf Events des Viewers
reagiert werden, zum Beispiel wenn das Dokument oder die aktive Seite gewechselt wurde.
Aktuell kann auf die folgenden Events reagiert werden:
Name | Description |
---|---|
currentPageIndexChange | Will emit whenever the viewer's current page changes. |
zoomFactorChange | Will emit whenever the viewer's zoom factor changes. |
pageCountChange | Will emit whenever the viewer's amount of loaded pages changes. During a document load, this will emit several times, usually once per page. |
viewerInitialized | Will emit once per component once the GWT viewer has been attached. |
documentChanged | Will emit whenever the viewer's document model changes. This usually happens once the first page of the physical document has been loaded. |
passwordRequired | Will emit when a password-protected PDF document is loaded. |
sourceChanged | Will emit whenever the viewer's source changes. |
pageLayoutChanged | Will emit whenever the viewer's PageLayout changes. |
annotationsChanged | Will emit whenever the viewer's list of annotations changes. |
pageSegmentsChanged | Will emit whenever page segments in the currently displayed document have been added, removed or modified. |
renderEvent | Will emit whenever the viewer's render controls change, e.g. zoom and page rotation. |