loadDocument is adding lib file path to document src path

Which product are you using? PDF.js Express Viewer

PDF.js Express Version 8.7.4

Detailed description of issue
When I attempt to load a document src, the viewer prefixes the path with the lib files path and I get a popup that says “Missing PDF [domain][pdfjs-express-viewer lib file path][document src path]”

This error is happening with and without the ‘options’ parameter in loadDocument(). I’ve also tried ‘instance.UI.loadDocument’

I’m using vue js 3.2.40

Expected behaviour
I’m expecting the pdf viewer to load the document file path without adding the lib file path in the middle

Does your issue happen with every document, or just one?
Every document

Code snippet

  <div ref="viewer"></div>

/* eslint-disable */
import WebViewer from "@pdftron/pdfjs-express-viewer";
import {onMounted, ref, watch} from "vue"
import {publicPath} from "../../vue.config";

export default {
  name: "WebViewer",
  props: {
    src: String,
  emits: ['done-loading', 'update-loading'],
  setup(props, {emit}) {
    let viewer = ref(null)

    onMounted(() => {
            path: publicPath + "lib", // viewer files path
            initialDoc: props.src || '',
            licenseKey: 'redacted',
      ).then((instance) => {
        // now you can access APIs through the WebViewer instance
        const {Core} = instance;

        watch(() => props.src, () => {
          instance.loadDocument(props.src, {
            onLoadingProgress: percent => {
              emit('update-loading', percent * 100)
            loadAsPDF: true
        Core.documentViewer.addEventListener('documentLoaded', () => {
          // must be set after document loads

    return {

Hello there,

Could you please provide the contents of your vue.config file as well?
Thank you.

Best Regards,
Darian Chen

module.exports = {
    runtimeCompiler: true,
    publicPath: process.env.NODE_ENV === 'production'
        ? '../dxc/'
        : '/dxc/',
    devServer: {
        proxy: {
            '^/api': {
                target: '[uat auth server link]',

the project and all assets are served from the /dxc path

Hello there,

When you load the document, the API should be either instance.UI.loadDocument or instance.Core.documentViewer.loadDocument.

Thank you for providing the previous code snippets. However, we we unable to reproduce the issue regarding the missing PDF popup.

Could you please provide a minimal sample of your project and a screenshot/video of the error?

Thank you.

Best Regards,
Darian Chen