TaTo30 / vue-pdf

PDF component for Vue 3
https://tato30.github.io/vue-pdf/
MIT License
473 stars 66 forks source link

Incorrect relative path for loading-icon.2cb588dc.svg causes 404 error #150

Closed Bronco84 closed 2 months ago

Bronco84 commented 2 months ago

Description:

There's a loading icon loading-icon.2cb588dc.svg embedded as a base64-encoded SVG in the code. However, the system is incorrectly referencing it using a relative path, which causes a 404 error.

Steps to Reproduce:

  1. Load a pdf into the viewer.
  2. Inspect the network requests using the browser's developer tools.
  3. Observe that the request for loading-icon.2cb588dc.svg returns a 404 error.

Expected Behavior:

The Base64-encoded SVG should be directly used for the loading icon, without requiring any network requests. The browser should display the icon without attempting to retrieve it from the server.

Actual Behavior:

The system attempts to retrieve the loading-icon from a relative path, which results in a 404 error.

Suggested Fix:

Ensure that the Base64-encoded SVG is correctly embedded in the code, and that the image is referenced directly, preventing a failed network request.

Screenshot 2024-09-20 at 3 11 42 PM

Additional context

TaTo30 commented 2 months ago

This seems to be an implementation issue. If your pdf needs to load images consider use image-resource-path prop to retrieve them correctly.

Bronco84 commented 2 months ago

This seems to be an implementation issue. If your pdf needs to load images consider use image-resource-path prop to retrieve them correctly.

Ah, I see what you mean. Sorry about that. I appreciate your work on the package!