Open MythologicalEngineer opened 5 years ago
same problem, can you find solution?
@tianzhich I spent way too much time trying to get it to work, I ended up just loading the viewer.js from the pdfjs project into an IFrame and issuing a load command to it. Not exactly elegant but worked really well.
Any updates
@tianzhich I spent way too much time trying to get it to work, I ended up just loading the viewer.js from the pdfjs project into an IFrame and issuing a load command to it. Not exactly elegant but worked really well.
Can you share the code.
Never mind, Following this blog i was able to implement pdfjs-2.3.200-dist in my react app through iframe https://www.pdftron.com/blog/react/how-to-build-a-react-pdf-viewer/
Hi Yury, very nice example here. I'm trying to adapt it to PDFJS 2.0 but I keep running into issues with the line:
let eventBus = new PDFJSViewer.EventBus();
I get error: Cannot read property 'EventBus' of undefined.
I'm currently trying to find a solution, have you ran into this yourself?
import * as PDFJSViewer from 'pdfjs-dist/web/pdf_viewer';
instead of:
import { PDFJS as PDFJSViewer } from 'pdfjs-dist/web/pdf_viewer';
Hi Yury, very nice example here. I'm trying to adapt it to PDFJS 2.0 but I keep running into issues with the line:
let eventBus = new PDFJSViewer.EventBus();
I get error: Cannot read property 'EventBus' of undefined.
I'm currently trying to find a solution, have you ran into this yourself?