Pan function in WebViewer 3.0

166 views
Skip to first unread message

Jessie Lin

unread,
Jun 21, 2017, 12:11:28 PM6/21/17
to PDFTron WebViewer
Hi, 

I am trying to upgrade the WebViewer 3.0 but found out the Pan and Text selection are not in ToolMode options any more.  When I call setToolMode(PDFTron.WebViewer.ToolMode.Pan) to enable Pan, it doesn't work. Also when I click the Pan button on the console, the cursor is changed but the icon button is not active. Please can you explain what's the recent behavior of Pan feature in WebViewer 3.0? Thank you.

Best regards,
Jessie 

Justin Jung

unread,
Jun 21, 2017, 3:56:01 PM6/21/17
to PDFTron WebViewer on behalf of Jessie Lin
Hello Jessie,

That sounds strange. The following code should trigger Pan tool.

readerControl.setToolMode(window.PDFTron.WebViewer.ToolMode.Pan);

Can you reproduce the same issue in showcase?

The new default tool behaviour is that when you hover over text, you will automatically be able to select text without switching to text select tool. Annotation multi-selecting happens when you click and drag. Also, if you hold space bar, pan tool is activated. This is similar to the behaviour in other PDF viewers, such as Acrobat.

Justin Jung
Software Developer
PDFTron Systems Inc.

Dhaya Benmessaoud

unread,
Oct 10, 2017, 11:51:26 AM10/10/17
to PDFTron WebViewer
Hi, I can confirm that "Pan" and "TextSelect" are not available anymore in PDFTron.WebViewer.ToolMode, and it is reflected in the documentation. Is that a mistake or is there another way to trigger those tool modes. As of now we managed to handle every breaking change from 2.2.2 to 3.0.1 but couldn't find a way to set those 2 tool modes.


Regards,
Dhaya

Justin Jung

unread,
Oct 10, 2017, 7:08:38 PM10/10/17
to PDFTron WebViewer on behalf of Dhaya Benmessaoud
The default tool has been created by merging AnnotationSelect, TextSelect and Pan tools. Normally it stays as AnnotationSelect, but when you hover over text it would auto-switch to TextSelect tool. Also, when you hold space bar, it switches to Pan tool. Did this behaviour work with your default tool?

If you wish to disable the auto-switching between AnnotationSelect and TextSelect tools, you can refer to this post: https://groups.google.com/d/msg/pdfnet-webviewer/ojYlx6L8FFc/4841NA8wBAAJ
Reply all
Reply to author
Forward
0 new messages