Interface IPdfviewer

All Superinterfaces:
IAnyGroup<IPdfviewer>, IComponent<IPdfviewer>, IHtmlBasedComponent<IPdfviewer>, ISingleChildable<IPdfviewer,IToolbar>, IXulElement<IPdfviewer>

Immutable Pdfviewer component

A PDF file viewer.

Support @Action

Name Action Type
onPaging ActionData: PagingData
Notifies one of the pages is selected by the user.
onRender Denotes the loading pdf file is finished rendering.
onZoom ActionData: ZoomData
Denotes user has changed the zoom level.
onRotate ActionData: RotationData
Denotes user has changed the rotation angle.
Author:
katherine
See Also:
  • Pdfviewer
  • Field Details

    • DEFAULT

      static final IPdfviewer DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zkex.pdfviewer.Pdfviewer"

      Specified by:
      getWidgetClass in interface IComponent<IPdfviewer>
    • getSrc

      @Nullable String getSrc()
      Returns the source URI of the PDF file.

      Default: null.

    • withSrc

      IPdfviewer withSrc(@Nullable String src)
      Returns a copy of this immutable component with the specified src.

      Sets the source URI of the PDF file.

      Parameters:
      src - The source URI of the PDF file.

      Default: null

      Returns:
      A modified copy of the this object
    • getZoom

      default double getZoom()
      Returns the zoom level.

      Default: 1.0.

    • withZoom

      IPdfviewer withZoom(double zoom)
      Returns a copy of this immutable component with the specified zoom.

      Sets the zoom level.

      Parameters:
      zoom - The zoom level.

      Default: 1.0

      Returns:
      A modified copy of the this object
    • getZoomMode

      default IPdfviewer.ZoomMode getZoomMode()
      Returns the zoom mode.

      Default: IPdfviewer.ZoomMode.NORMAL

    • withZoomMode

      IPdfviewer withZoomMode(IPdfviewer.ZoomMode zoomMode)
      Returns a copy of this immutable component with the specified zoom.

      Sets the zoom mode for IPdfviewer.ZoomMode.FIT_PAGE_WIDTH or IPdfviewer.ZoomMode.FIT_PAGE_HEIGHT.

      Parameters:
      zoomMode - The zoom mode.

      Default: IPdfviewer.ZoomMode.NORMAL

      Returns:
      A modified copy of the this object
    • getRotation

      default int getRotation()
      Returns the rotation angle.

      Default: 0.

    • withRotation

      IPdfviewer withRotation(int rotation)
      Returns a copy of this immutable component with the specified rotation.

      Sets the rotation angle.

      Parameters:
      rotation - The rotation angle

      Default: 0

      Returns:
      A modified copy of the this object
    • of

      static IPdfviewer of(String src)
      Returns the instance with the given src.
      Parameters:
      src - The source URI of the component
    • of

      static IPdfviewer of(IToolbar child)
      Returns the instance with the given child.
    • ofId

      static IPdfviewer ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component