You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that ./pdf-test.pdf is being correctly served by your server. Sometimes relative paths can cause issues if the file is not in the correct location or is not being served.
If the PDF file is in the public directory of your project, you can directly reference it using a relative URL:
constdocs=[{uri: "/pdf-test.pdf"}];
The public directory is directly served at the root of your app, so referencing /pdf-test.pdf should work without additional configuration.
If the file is in the src directory, you can import it using require or import:
This will ensure that the file is bundled when your app is compiled. However, this approach may not work well for large files, so serving from the public folder is often a better approach.
When trying to load a PDF file I get the following error:
Here is the code:
The text was updated successfully, but these errors were encountered: