Re-builded PDF tron view page (ReaderControl.html),

48 views
Skip to first unread message

Alexey Pasmanik

unread,
Nov 30, 2016, 1:53:52 PM11/30/16
to PDFTron WebViewer
HI !

I re-builded PDF tron view page (ReaderControl.html), stopped to work annotation event on select (on click)


Part code: 

am.on('annotationSelected', function(e, annotations, action) {
alert('annotationSelected');
}

Alexey  p.



Matt Parizeau

unread,
Dec 1, 2016, 3:27:50 PM12/1/16
to PDFTron WebViewer
Hi Alexey,

Would you be able to send a sample project with the issue you're having. It's hard to say what's going wrong because it's likely to do with the modifications that you've made to ReaderControl.

Thanks,

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Alexey Pasmanik

unread,
Dec 5, 2016, 2:19:26 PM12/5/16
to PDFTron WebViewer
Hi ,

We already resolved the problem.

Was missed clipboard HTML element, directly controlled from  CoreControl , 

<textarea id="clipboard" readonly style="display: none"></textarea>

But why you mix core functionality with editable html  ? 

Regards, 
Alexey P.

Matt Parizeau

unread,
Dec 6, 2016, 7:29:57 PM12/6/16
to PDFTron WebViewer
Hi Alexey,

ReaderControl.js should be the one that is accessing the clipboard element, it shouldn't be accessed directly from CoreControls. ReaderControl.js and ReaderControl.html are effectively user code as they aren't minified and are only using the public WebViewer APIs so I don't think it's unreasonable that the script loaded from ReaderControl.html is expecting a particular element to exist there. If you can show us where CoreControls is depending on the clipboard element we can definitely take a look and remove that dependency.

Thanks,

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