-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: #4
Comments
@anvithks Thanks for your response :-) Here is the link to the repository of my website where I want to use Hugo Embed PDF shortcode. I call the short code only in a .md markdown file by using the following command:
My issue has great similarities to issue #18. However, I was not able to solve the issue based on the mentioned work around by Arwhyte . Note I cloned your repository by using Thanks for looking into this! |
One thing I see is that the PDF file is not located with the .md file where it is included. Currently this is a limitation for which I am yet to get a proper solution. |
Hi @anvithks, thanks for your reply :-)
|
@jfparie I cloned your repository and by making a few changes I was able to get the pdf to display.
With these changes I am able to see the pdf file. This problem arises when we use the baseURL and try to build locally or do not specify one and try to build locally. I will try to fix this but in the meanwhile you can try the following:
Best, |
Many thanks for fixing this! I will take a careful look later. Would you mind to remove the image previewing the document (the document should remain undisclosed)? Many thanks again :-) |
@jfparie sure. I have removed the screenshot. |
Chrome browser 95.0.4638.69 gives the following error:
Cannot read properties of undefined (reading 'GlobalWorkerOptions') at window.onload ((index):256)
I copied
./layouts/shortcodes/embed-pdf.html
to my own/layouts/shortcodes
folder. The same from pdf.js library files from./static/js/pdf-js
to./static/js
. Is the following path structure correct?- static
-- js
--- pdf-js
---- build
----- pdf.js
----- pdf.js.map
----- pdf.worker.js
----- pdf.worker.js.map
---- LICENSE
---- web
----- cmaps
etc.
The text was updated successfully, but these errors were encountered: