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

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

<script>
/* 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(() => {
      WebViewer(
          {
            path: publicPath + "lib", // viewer files path
            initialDoc: props.src || '',
            licenseKey: 'redacted',
          },
          viewer.value
      ).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', () => {
          emit('done-loading')
          // must be set after document loads
          instance.setLayoutMode(instance.LayoutMode.Continuous)
        });
      });
    })

    return {
      viewer
    }
  }
};
</script>

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