Closed henry-chris closed 6 years ago
Update: From this repo, I can run the samples...but I'm having a lot of trouble just running the UI with the dev server. It's using my global webpack-cli, which is newer than your version and does not work correctly with your version of webpack. When I fix that, there it can't find the 'babel-preset-react'. Probably because I had to update webpack to a newer version for the previous problem. We use babel 7.0 with a .babelrc file (you guys had one in your beta source code) so it's hard to directly pinpoint my issue.
However, running the samples, it seems like you point to 'demo.pdftron.com' to load everything. Once I commented that out, you can just run the sample 'Viewing sample' and reproduce the thumbnail issue.
They don't even render with your default PDF, but the annotations render on the page fine somehow. This is the exact problem we are seeing, as we currently default to client only in Chrome.
The only changed code (viewing.js):
// Instantiate
var viewerElement = document.getElementById('viewer');
var viewer = new PDFTron.WebViewer({
path: '../../../lib',
l: window.sampleL,
**//pdftronServer: 'https://demo.pdftron.com/', // comment this out to do client-side only**
initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/webviewer-demo-annotated.pdf'
}, viewerElement);
Hi Henry,
Thank you for the all the details. We were able to reproduce the issue on our end, and we'll come up with a fix soon.
It's sad to hear the sample doesn't run with the newer version of webpack. We'll investigate if there's anything we can to to mitigate it.
It's sad to hear the sample doesn't run with the newer version of webpack. We'll investigate if there's anything we can to to mitigate it.
Oh, it seems to be an issue with webpack with newer versions of webpack CLI. It's my own computers fault, but I was stumped by it using my global CLI version. I can't find the issue right now, but
Here's a link that references the issue I think.
Also, great to hear about reproducing the thumbnail issue.
Repro Steps - v1 React UI
First:
Most of the PDFs loaded by 'Open by url' work decently.
Second: In our modified version v1 (v4?) webviewer UI, we cannot get any PDFs to load thumbnails. In the beta UI, everything loaded just fine.
Our webviewer constructor -
Extra settings we are using -
So, for us NO pdf will display rendered thumbnails at all. And your demo viewer only displays them when loading from a URL, but not from a local file.
I've only tested in Chrome. I'm not sure if the demo issue is associated with us not being able to view any thumbnails or not, but it seems like it is. I have not reproduced this specifically in the open source version of the UI, so let me know if I need to give you more information.
Also, this might not specifically be related to the UI, so my apologies if this issue is errant.