Class PDFViewer

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, java.io.Serializable

    @Tag("pdf-viewer")
    @NpmPackage(value="pdfjs-dist",
                version="2.15.349")
    @JsModule("./pdfviewer/pdf-viewer.js")
    public class PDFViewer
    extends com.vaadin.flow.component.polymertemplate.PolymerTemplate<com.vaadin.flow.templatemodel.TemplateModel>
    implements com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasComponents
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PDFViewer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PDFViewer drawImage​(java.lang.String imageName, java.lang.String imageURL)  
      int getCurrentPage()  
      double getImageScale()  
      float getImageX()  
      float getImageY()  
      int getPageCount()  
      void load​(java.lang.String resource)  
      PDFViewer removeImage()  
      PDFViewer setImageScale​(double e)  
      PDFViewer showPage​(int page)  
      • Methods inherited from class com.vaadin.flow.component.polymertemplate.PolymerTemplate

        getChildren
      • Methods inherited from class com.vaadin.flow.component.polymertemplate.AbstractTemplate

        getModel, getModelType, getModelType, getStateNode, initModel, isSupportedClass
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, addComponentAsFirst, addComponentAtIndex, remove, removeAll
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasEnabled

        isEnabled, setEnabled
      • Methods inherited from interface com.vaadin.flow.component.HasSize

        getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFull
      • Methods inherited from interface com.vaadin.flow.component.HasStyle

        addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
      • Methods inherited from interface com.vaadin.flow.component.HasTheme

        addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
    • Constructor Detail

      • PDFViewer

        public PDFViewer()
    • Method Detail

      • load

        public void load​(java.lang.String resource)
      • drawImage

        public PDFViewer drawImage​(java.lang.String imageName,
                                   java.lang.String imageURL)
      • getImageX

        public float getImageX()
      • getImageY

        public float getImageY()
      • setImageScale

        public PDFViewer setImageScale​(double e)
      • getImageScale

        public double getImageScale()
      • getPageCount

        public int getPageCount()
      • getCurrentPage

        public int getCurrentPage()
      • showPage

        public PDFViewer showPage​(int page)
      • removeImage

        public PDFViewer removeImage()