Comments (15)
The downloader issue should be solved based on the support email thread. For the PDFTron server issue we're narrowing in on a fix for the issue and unfortunately it doesn't look like it can be easily worked around on your end right now. We'll keep you updated when we have more information.
from webviewer-ui.
So, as a follow-up. We started taking graphics out of the linked PDF. As we removed more and more graphics we found that the annotations loaded correctly a greater percentage of the time. Once we got down to a single Rectangle on one page, the amount of times that the annotations either loaded incorrectly or didn't display at all were very small. As we put more graphics back in the amount of times the annotations loaded incorrectly went up.
from webviewer-ui.
Thank you for very detailed explanations and observations. This seems like an issue with the core more than the UI, so it may take a bit longer to investigate. I'll pass this down to the core team, and let you know when the fix is available :)
from webviewer-ui.
Thanks, should I open an issue on your website with our Viewer license and link it to here or anything? If not, this sounds fine to me. Thanks for letting me know.
As another update, this behavior has started cropping in in Chrome and other browsers than IE11, now.
from webviewer-ui.
We've determined that the issue occurs for this document when using the pdftronServer option and behind the scenes a XOD document is being used. We're currently investigating a fix.
from webviewer-ui.
This is also happening when using the pdfnetjs and 'Downloader' option to stream the actual pdf. I also get warnings from Core if I try to export() before the full PDF is loaded and the command XML then tries to save out the moved annotations with 'NaN' positions. Since some if our PDFs take 30-40 sec to fully download, it's happening a lot.
from webviewer-ui.
This is also happening when using the pdfnetjs and 'Downloader' option to stream the actual pdf. I also get warnings from Core if I try to export() before the full PDF is loaded and the command XML then tries to save out the moved annotations with 'NaN' positions. Since some if our PDFs take 30-40 sec to fully download, it's happening a lot.
For Example:
- Using Chrome pdfnetjs/useDownloader. Loading a 156MB doc with some annots possibly embedded in the document.
- We load our site and it begins to stream the .PDF using range streaming. This takes between 25-40 seconds to finish (partial content seems to be coming in at 512KB pieces).
- We set the XFDF to make an XHR call when 'DocumentLoaded' triggers. This grabs the full XFDF, and we poll for the XFDF every 30 seconds (we can't use SSE or Push Events yet)
- We initially see the Annotations load into incorrect positions (possibly loaded with no positions as some are in top left corner).
- If the PDF is still loading and we try to update the XFDF with a new Annot, all annots on the current displayed page are sent in the CMD XML with 'NAN' positions (e.g. on a comment rect='NaN, NaN, NaN, NaN'). At this point our annotations are hosed.
You can see the Cmd XML being sent out while the PDF is still being streamed.
- IF we wait and let the PDF Fully load, the same thing happens as the above. However, if we wait a longer time (say 30 seconds after the PDF fully downloads) it seems that we can then import our annotations successfully.
The PDF I am using to test: https://pdfmarkupblobstore.blob.core.windows.net/sample-container/ZierdtRdPhase4.pdf
Questions:
-
Is there a workaround that could be easily implemented...i was thinking of keeping a dictionary of annotations in memory and having a function that imports them when a page is displayed....not sure if that would work, though. I guess I'd need to way to grab them after de-serialization occurs but before they are loaded. Maybe make them unlistable at first.
-
Is this a separate bug from the PDFTron server one or are we just using your software incorrectly?
from webviewer-ui.
We've determined that the issue occurs for this document when using the pdftronServer option and behind the scenes a XOD document is being used. We're currently investigating a fix.
Any news on this? If I need to write a workaround for documents not streamed by the PdfTron Server I can. I just need to know which way to go.
from webviewer-ui.
OK, we've been able to resolve the issue and you can use this updated build which contains the fix http://www.pdftron.com/ID-zJWLuhTffd3c/WebViewer/WebViewer_4.0.2.68289.zip. Thanks for the detailed bug reports and your patience!
@henry-chris When you've confirmed it's working for you I'll close this issue.
from webviewer-ui.
Thanks! That's great news. We really were wondering if we were misusing the software with the way we ended up importing annotations. Hopefully this wasn't a weird use case for you guys as I'd rather go the more conventional route if possible.
It may take me a couple days to verify this because I'm also verifying the downloader fix among other things.
I'll let you know as soon as I can.
from webviewer-ui.
Normally we recommend you use the serverUrl option but it depends a bit on what you want to do with internal document annotations, so loading annotations on documentLoaded is intended to be supported. We're going to be updating our guides relatively soon to go through the different options available for annotation saving/loading to make things more clear about what is supported and expected.
It turned out in this case that there was a timing issue with getting the correct page transformation when a XOD file was being used by the server so it was possible to import annotations in document loaded before the correct transformation data was available and the annotations would be placed in the wrong location.
from webviewer-ui.
I sent an email saying that the 3 issues we were seeing are solved, including this one.
Now, we are seeing that our annotations are being sorted incorrectly in many cases since updating to the 4.0.2 version you gave us and it only happens when downloading via Range Requests.
I can't really show you very well as we have heavily modified the Notes Panel on our end, but our issues only happened after upgrading to 4.0.2. Basically while downloading the document, notes are sorted in one way, while we tell PDFTron to sort the other way by default. While downloading we see 'toggling' of the sorting methods in the notes panel where it's usually incorrect but sometimes toggles on and off.
Once the PDF is fully downloaded, the notes 'snap' into their correct sorted display and stay there for the rest of the session.
Since this may be related to the issue here, I'll leave it and only open a new one if instructed or we can verify it's an issue on your end (and not ours).
from webviewer-ui.
Just to clarify, are you using a custom sorting algorithm and the sorting algorithm is switching back and forth (between custom and default algorithms) as the annotations are being imported?
from webviewer-ui.
Yes, basically we added a reverse time sort. 'OrderByNewest' and 'OrderByOldest'. When using the 'Downloader' option with a PDF and no PdfTron Server we would see it sort as the default sort method until the document was fully downloaded. Then, another importAnnotationsAsync() would be triggered and it would sort the annotations the 'other' way.
In 4.0.1 we did not have this problem. It seems that you recently changed how you interact with the sortmap.
I'd have to get my co-worker to comment for more details, sorry. Basically we ended up changing the sorting algorithms in 'sortMap.js' and everything works fine now. Here's an example:
I'm not sure if he debugged into the 'getLatestActivityDate' function. Let me know if you want more details. It could very well be that it was caused by something we did.
from webviewer-ui.
We did reproduce the issue and also observed the change from your co-worker fixes the issue. One thing to note is that the getLatestActivityDate should return the date of a last activity related to that note, including replies. We'll create a separate issue on this.
from webviewer-ui.
Related Issues (20)
- [Bug] Preview file: Cannot read properties of undefined (reading 'Annotations') version 10.4.0 HOT 1
- [Bug] Error when changing the document after update to 10.5.0 HOT 2
- [Feature Request] Custom Right Click Menu for Bookmarks HOT 1
- [Bug] Toolbar does not show up if 'header' is disabled HOT 3
- [Feature Request] Customize how a Datetime will appear in a note/comment HOT 1
- Fit Mode doesnt work for the second document HOT 1
- [Bug] Shift+Click thumbnails degraded behavior in 10.6 HOT 2
- Post-install run build/start is failing HOT 1
- Getting error after integrating pdfnet-node library in angular. HOT 1
- [Bug] Webviewer showing markReplaceTextToolButton in Read only mode HOT 1
- [Bug] TypeScript Error: Property 'customHandlerId' Not Recognized in '@pdftron/webviewer' Method 'instance.UI.loadDocument HOT 1
- PDF with 3d Data shows black page HOT 1
- [Bug] Keyboard shortcuts are not working after updated to 10.8 HOT 1
- [SECURITY] CVE-2023-26149 quill-mention HOT 6
- Running latest version project changes throws multiple scss errors HOT 2
- [Feature Request] expose options for instance.UI.print HOT 2
- [Bug] CustomStamps exports an invalid textColor in case of the default white text color HOT 1
- [Bug] instance.UI.setActiveLeftPanel not working in modular UI HOT 1
- [Bug] Unable to open context menu HOT 1
- [Bug] Unable to enter a multi-digit page number in modular UI page controls input HOT 1
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 webviewer-ui.