Comments (11)
Yea! looks good.
from react-pdf-highlighter.
Updating to 2.0.943 doesn't seem to help.
The browser console shows this error:
bootstrap:1 Uncaught ReferenceError: window is not defined
And the bash console shows this warning:
./node_modules/pdfjs-dist/build/pdf.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
from react-pdf-highlighter.
@agentcooper I used your demo as is with a new project I created with create-react-app
I hacked it by installing the new version of pdfjs-dist
and replacing the import of pdfjs in PdfLoader
with:
import pdfjs from 'pdfjs-dist';
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${ pdfjs.version }/pdf.worker.js`
from react-pdf-highlighter.
@curiosity26 solved now?
from react-pdf-highlighter.
It's not working for me with webpack 4 seems that pdfjs-dist wasn't updated is there a way to use the webpack 4 compatible version?
from react-pdf-highlighter.
@z4m0 could you please try updating the version and see if this helps? If yes, I'll gladly accept a PR.
from react-pdf-highlighter.
It's not working for me as well. Does Anyone know how to fix?
from react-pdf-highlighter.
@ranihorev could you please create a reproducible example?
from react-pdf-highlighter.
@ranihorev thanks, I'll try to update pdfjs-dist dependency this weekend
from react-pdf-highlighter.
haiii @ranihorev i have same problem like you...
i has build new project create-react-app and then i have error
"bootstrap:1 Uncaught ReferenceError: window is not defined"
at bootstrap:1
at bootstrap:788
you have solved this issue ???
from react-pdf-highlighter.
@Marlendo I solved it with the solution above:
#14 (comment)
Have you tried that?
from react-pdf-highlighter.
Related Issues (20)
- How to reset/remove a single Highlight by ID? HOT 1
- Loading testHighlights sample with viewport
- Chinese does not display HOT 2
- Bounding rectangle calculation / transformation HOT 1
- Unable to load larger PDF files from URL
- Array of strings to automatically create highlights HOT 3
- Supply option to set textLayerMode HOT 1
- can't load the PdfLoader component HOT 1
- Handle large pdfs > 500 pages
- How to listen to scroll events HOT 1
- selection coordinate error HOT 1
- is it possible to convert the synctex coordinate to react-pdf-highlighter coordinate
- requirement: will one day this tool support overlapping two highlight part ? HOT 1
- Dockerfile for deployment
- Adding JWT to request headers when PDF is retrieved HOT 2
- Issue with Scrolling to Runtime-Added Highlight HOT 1
- PDF Reloads when highlights are added/modified HOT 3
- Area Highlight is misaligned on container resize HOT 1
- After Upgade The Package Getting `No Such File Or Directory Warning` HOT 2
- Is this project still active? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-pdf-highlighter.