Understanding differences between documentReady and pageComplete event

63 views
Skip to first unread message

prakhar jaiswal

unread,
Dec 28, 2016, 12:44:17 PM12/28/16
to PDFTron WebViewer
Hi,

As for now, my understanding around both the events were:

documentReady - is triggered when annotations and the document has been loaded.
pageComplete - is triggered when the page is rendered completely along with annotations.

But, it was discovered with image stamps that the documentReady is actually being triggered when the page is completely rendered along with the image stamp annotations. Whereas, pageComplete only corresponds with rendering of the page (not annotations).

Could you help discriminate between both the events with respect to rendering of page?

Thanks!

Matt Parizeau

unread,
Dec 29, 2016, 1:52:21 PM12/29/16
to PDFTron WebViewer
Hi,

The documentReady event is triggered when all of the initial annotations have been loaded into the AnnotationManager. It isn't directly tied to rendering.
The pageComplete event should be triggered when the page, including annotations, has been rendered. If you're able to provide a sample showing how annotations are being rendered after pageComplete then we could look into why that's happening, but that isn't how it's intended. Let me know if you need any further clarifications.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

prakhar jaiswal

unread,
Jan 10, 2017, 12:57:11 PM1/10/17
to PDFTron WebViewer
Hi Matt,

Please find a sample PDF document here to replicate the scenario: https://drive.google.com/open?id=0B_qQ5AhUBlZCV095aTRMeW9TM3M

Thanks

prakhar jaiswal

unread,
Jan 11, 2017, 12:44:50 PM1/11/17
to PDFTron WebViewer
Hi Matt,
Adding to it, the document while being loaded threw the following exception:

Exception: ↵     Message: Bad Allocation↵     Filename: AlignedBuffer.hpp↵     Function: Allocate(UInt32 num_bytes)↵     Linenumber: 

We found previous links referring to the similar error on web: https://support.citavi.com/forum/viewtopic.php?f=163&t=12894

Matt Parizeau

unread,
Jan 11, 2017, 4:40:35 PM1/11/17
to PDFTron WebViewer
Hi,

Thanks for sending the file. We actually weren't able to reproduce that error message but we did see a problem where the annotations weren't being loaded after several minutes of waiting. Do you see this issue as well?  Because we're seeing the problem of the annotation data not loading at all this means that we actually never see the documentReady event fire so it may be something different than what you're seeing. We're going to investigate that problem and can let you know when we have more information.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Matt Parizeau

unread,
Jan 12, 2017, 6:08:14 PM1/12/17
to PDFTron WebViewer
Here is a build that should fix the issue: http://www.pdftron.com/ID-zJWLuhTffd3c/WebViewer/WebViewer2.2.1.54503.zip

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages