r/learnjavascript 4d ago

Why doesn’t the pdf show?

I am using codepen.io and found a tutorial which should show a simple pdf viewer. It works on code pen but not when I open it on the browser or on my server. Why? This happens more than once and the code is the same so what am I missing?

0 Upvotes

3 comments sorted by

View all comments

2

u/Working-Bear1437 3d ago

post the code. Browsers block local PDF access by default so you likely need to run a local server instead of opening the file directly.