Comments (7)
We tried loading a XOD file with 600+ pages, but we weren't able to reproduce SET_TOTAL_PAGES being triggered multiple times. We also dispatch the action in three event listeners only:
- onBeforeDocument: to get total pages from metadata
- onDocumentUnloaded: to set total pages to 0
- onLayoutChanged: the event name's misleading, but this event gets triggered when pages have permanently been added or removed.
Could you provide more information to help us debug the issue?
from webviewer-ui.
We also tried loading linearized PDF with 600+ pages, but SET_TOTAL_PAGES was triggered only once.
from webviewer-ui.
from webviewer-ui.
from webviewer-ui.
After we upgraded and merged to 4.0.2_68331 version.
Note that the 'SET_TOTAL_PAGES' happens a LOT more after the picture. Probably one for every partial content download (but I haven't verified this).
PDF can be found here: https://pdfmarkupblobstore.blob.core.windows.net/sample-container/ZierdtRdPhase4.pdf
from webviewer-ui.
Oh, I missed something from your previous message, sorry.
It's definitely onLayoutChanged.js:
Put a breakpoint in all 3 places. It hits 'onBeforeDocumentLoaded' first (once), then hits the 'onLayoutChanged' every other time (a lot).
If I trace this back, I come first to this function in your minified CoreControls (let me know if you'd prefer me to not post these):
I formatted CoreControls inside the Chrome debugger. CoreControls should be this version - 4.0.2_68331. Hopefully this helps.
from webviewer-ui.
LayoutChanged event will be triggered when there are pages added, deleted, moved(index of a page changed) or content has changed. When we are downloading linearized PDF, pages will be updated and this event will be triggered. SET_TOTAL_PAGES should be dispatched once in the beginning and not be dispatched in the subsequent page updates. We will fix it and merge to master soon.
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.