Enum Class DocumentErrorReason

java.lang.Object
java.lang.Enum<DocumentErrorReason>
com.vaadin.flow.component.pdfviewer.DocumentErrorReason
All Implemented Interfaces:
Serializable, Comparable<DocumentErrorReason>, Constable

public enum DocumentErrorReason extends Enum<DocumentErrorReason>
The reasons why PdfViewer could not load a document, see PdfViewer.DocumentErrorEvent.
Since:
25.4
Author:
Vaadin Ltd
  • Enum Constant Details

    • NETWORK

      public static final DocumentErrorReason NETWORK
      The document could not be fetched, for example because the URL does not exist or the server responded with an error.
    • INVALID

      public static final DocumentErrorReason INVALID
      The data is not a valid PDF document.
    • PASSWORD

      public static final DocumentErrorReason PASSWORD
      The document needs a password to open. Password-protected documents are not supported.
  • Method Details

    • values

      public static DocumentErrorReason[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DocumentErrorReason valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null