Skip to main content

Event Handling und Schnittstellen

Die einzelnen Komponenten arbeiten mit @Input und @Outputs, 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:

NameDescription
currentPageIndexChangeWill emit whenever the viewer's current page changes.
zoomFactorChangeWill emit whenever the viewer's zoom factor changes.
pageCountChangeWill emit whenever the viewer's amount of loaded pages changes. During a document load, this will emit several times, usually once per page.
viewerInitializedWill emit once per component once the GWT viewer has been attached.
documentChangedWill emit whenever the viewer's document model changes. This usually happens once the first page of the physical document has been loaded.
passwordRequiredWill emit when a password-protected PDF document is loaded.
sourceChangedWill emit whenever the viewer's source changes.
pageLayoutChangedWill emit whenever the viewer's PageLayout changes.
annotationsChangedWill emit whenever the viewer's list of annotations changes.
pageSegmentsChangedWill emit whenever page segments in the currently displayed document have been added, removed or modified.
renderEventWill emit whenever the viewer's render controls change, e.g. zoom and page rotation.