New to Kendo UI for jQuery? Start a free 30-day trial

Specifies the localization messages for various error scenarios that can occur during PDF processing and display. These messages are shown to users when errors are encountered.

<div id="pdfviewer"></div>
<script type="module">
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
    },
    messages: {
      errorMessages: {
        notSupported: "Only PDF files are allowed.",
        parseError: "PDF file failed to process.",
        notFound: "File was not found.",
        popupBlocked: "Popup was blocked."
      }
    }
  });
</script>

Specifies the error message displayed when the specified PDF file URL returns a 404 error or the file cannot be located at the provided path.

Default: "File is not found."

<div id="pdfviewer"></div>
<script type="module">
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
    },
    messages: {
      errorMessages: {
        notFound: "Custom message: File was not found."
      }
    }
  });
</script>

Specifies the error message displayed when a user attempts to open a file that is not a PDF format. This validation occurs during file selection or upload.

Default: "Only pdf files allowed."

<div id="pdfviewer"></div>
<script type="module">
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
    },
    messages: {
      errorMessages: {
        notSupported: "Custom message: Only PDF files are allowed."
      }
    }
  });
</script>

Specifies the error message displayed when the PDF processing library fails to parse or render the PDF file due to corruption, unsupported features, or internal errors.

Default: "PDF file fails to process."

<div id="pdfviewer"></div>
<script type="module">
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
    },
    messages: {
      errorMessages: {
        parseError: "Custom message: PDF file failed to process."
      }
    }
  });
</script>

Specifies the error message displayed when browser popup blockers prevent the PDF viewer from opening new windows for print or download operations.

Default: "Popup is blocked."

<div id="pdfviewer"></div>
<script type="module">
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
    },
    messages: {
      errorMessages: {
        popupBlocked: "Custom message: Popup was blocked."
      }
    }
  });
</script>