Class PdfViewer.DocumentLoadEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<PdfViewer>
com.vaadin.flow.component.pdfviewer.PdfViewer.DocumentLoadEvent
All Implemented Interfaces:
Serializable
Enclosing class:
PdfViewer

@DomEvent("document-load") public static class PdfViewer.DocumentLoadEvent extends ComponentEvent<PdfViewer>
Event fired when a document has been loaded, before its pages are shown.
See Also:
  • Constructor Details

    • DocumentLoadEvent

      public DocumentLoadEvent(PdfViewer source, boolean fromClient, @EventData("event.detail.pageCount") int pageCount, @EventData("event.detail.title") String title)
      Creates a new event.
      Parameters:
      source - the source component
      fromClient - true if the event originated from the client
      pageCount - the number of pages in the document
      title - the title of the document, or an empty string if it has none
  • Method Details

    • getPageCount

      public int getPageCount()
      Gets the number of pages in the document.
      Returns:
      the number of pages
    • getTitle

      public String getTitle()
      Gets the title of the document from its metadata.
      Returns:
      the title, or an empty string if the document has no title