iOS Cordova issues

158 views
Skip to first unread message

Justin Jung

unread,
Jun 6, 2019, 8:14:11 PM6/6/19
to PDFTron WebViewer
Reposted for David Compton

So here is feedback on version 5.1.  We still cannot release this to our iOS customers for the following reasons:

1. Page number navigation problem detailed here:   https://groups.google.com/forum/#!topic/pdfnet-webviewer/nehLAIUDTXQ
2. If you have a reasonable sized document e.g. 300 odd pages, and you scroll for long enough on iOS eventually you get blank pages in the document and the page number indicator stops working as you keep scrolling.  If you zoom then the pages become visible, but the page number indicator still does not work, and as you keep scrolling you get more blank pages.  Have to restart the app to fix.
3. When scrolling in any zoom level above "fit page" then the document floats backwards and forwards across the page as you scroll.  This is not normal scrolling behavior.

Here is a link to a video showing problems 2 and 3: https://www.dropbox.com/s/hlhylrk4e68l8j9/FCGS9344%5B1%5D.MP4?dl=0

Kind regards,

David

Justin Jung

unread,
Jun 6, 2019, 8:41:46 PM6/6/19
to PDFTron WebViewer
Hi David,

For #2, is this an issue that didn't happen with the custom build that I've sent you? It looks like all the code has been ported in 5.1, so it would be surprising if this issue is something new that's introduced in 5.1

For #3, I cannot reproduce the issue you are observing. Could it be some of the files are cached and messing up the app?

Best Regards,
Justin Jung
Software Developer
PDFTron Systems Inc.

David Compton

unread,
Jun 10, 2019, 2:11:29 PM6/10/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

No I don't believe anything is cached.  

#2  I'm guessing that the problem did exist in the custom build.  Maybe I didn't push it hard enough - although I thought that I had.  I was ready to release this to our users yesterday (and very excited about that prospect) when as a final check I asked a colleague to test it for me on their device.  They told me they were getting blank pages.  I then tried again and eventually after quite a bit of scrolling (as per the video) the problem occurred.  

#3  This does not seem to be a new problem.  I noticed after I sent my email to you that it even happens in our web application on a Surface Pro with a touch screen if you scroll with your finger.  If you scroll on the Surface Pro using your mouse wheel then the page scrolls in the same vertical plane.  But if you use your finger, either on a laptop touch screen or on an iPad then the document moves about horizontally as your finger moves (it is almost impossible to swipe up and down in an absolutely straight vertical line with your finger).  So it is like it is being scrolled horizontally as well as vertically.  Clearly this is not an iOS issue.  Once again it was my colleague doing the last minute testing that raised this issue with me.

I apologise for not picking up these issues earlier.  If I had I would have alerted them to you.  However they are genuine issues that need to be addressed.  #2 is by far the most important.

Kind regards,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfnet-webviewer/81a2b87f-e6bf-4d39-97a8-0ef181df1caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Andrew Yip

unread,
Jun 19, 2019, 6:48:15 PM6/19/19
to PDFTron WebViewer
Hi David, 

We are investigating your issues and wanted to give you an update. For the issues you listed

 #2  I'm guessing that the problem did exist in the custom build.  Maybe I didn't push it hard enough - although I thought that I had.  I was ready to release this to our users yesterday (and very excited about that prospect) when as a final check I asked a colleague to test it for me on their device.  They told me they were getting blank pages.  I then tried again and eventually after quite a bit of scrolling (as per the video) the problem occurred.

We are looking into ways to prevent this from happening. 

#3  This does not seem to be a new problem.  I noticed after I sent my email to you that it even happens in our web application on a Surface Pro with a touch screen if you scroll with your finger.  If you scroll on the Surface Pro using your mouse wheel then the page scrolls in the same vertical plane.  But if you use your finger, either on a laptop touch screen or on an iPad then the document moves about horizontally as your finger moves (it is almost impossible to swipe up and down in an absolutely straight vertical line with your finger).  So it is like it is being scrolled horizontally as well as vertically.  Clearly this is not an iOS issue.  Once again it was my colleague doing the last minute testing that raised this issue with me.

We are updating how our scrolling behaves to make vertical scrolling between pages more smooth.  For the document you're testing with, do you happen to have an extra wide page in it? We noticed that in the video you sent us, when you were zoomed out,  there was some horizontal scrolling. We are wondering if a page with a large width not shown was enabling the horizontal scroll. Normally when all the pages fit, there wouldn't be any horizontal scroll.

Best Regards,
Andrew Yip
Software Developer
PDFTron Systems, Inc.

David Compton

unread,
Jun 19, 2019, 9:19:54 PM6/19/19
to PDFTron WebViewer on behalf of Andrew Yip
Hello Andrew,

Thanks for the update.  I had been wondering how things were going.

#3  This does not seem to be a new problem.  I noticed after I sent my email to you that it even happens in our web application on a Surface Pro with a touch screen if you scroll with your finger.  If you scroll on the Surface Pro using your mouse wheel then the page scrolls in the same vertical plane.  But if you use your finger, either on a laptop touch screen or on an iPad then the document moves about horizontally as your finger moves (it is almost impossible to swipe up and down in an absolutely straight vertical line with your finger).  So it is like it is being scrolled horizontally as well as vertically.  Clearly this is not an iOS issue.  Once again it was my colleague doing the last minute testing that raised this issue with me.

We are updating how our scrolling behaves to make vertical scrolling between pages more smooth.  For the document you're testing with, do you happen to have an extra wide page in it? We noticed that in the video you sent us, when you were zoomed out,  there was some horizontal scrolling. We are wondering if a page with a large width not shown was enabling the horizontal scroll. Normally when all the pages fit, there wouldn't be any horizontal scroll.

Yes I think you are right, the horizontal scroll only seems to occur if the document contains extra wide pages.  Note that it does not happen when "Fit to Page" is selected, even with the extra wide pages.  

Kind regards,

David


--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.

For more options, visit https://groups.google.com/d/optout.


--

Andrew Yip

unread,
Jun 20, 2019, 5:53:56 PM6/20/19
to PDFTron WebViewer
Hi David,

For scrolling, I wanted to clarify what behavior you expect in general. Currently we have 'momentum' scrolling that is causing vertical scrolling to 'wiggle' because users aren't doing perfectly vertical swipe. This behaves the same way as Safari and Chrome native touch scrolling. Abode Acrobat App does something different, when the user swipe, it'll lock the screen to only allow movement in one axis. 

I wanted to ask for your opinion for touch scrolling behavior.

David Compton

unread,
Jun 21, 2019, 7:30:40 PM6/21/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

Firstly I'd say that the most important thing for us is smooth native like scrolling that just continues to work without stuttering, blank pages or "crashes" etc.  

In regards to the vertical/horizontal scrolling, locking the screen to only allow movement on one axis when swiping seems to us to be better, more expected behavior for a document - particularly when you are using that scrolling to move from page to page - not just within the page..  It might be different if you were scrolling a web page or something else - but obviously the web viewer is being used as a document viewer.

Thanks for asking our opinion.

Kind regards,

David 

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.

For more options, visit https://groups.google.com/d/optout.


--

Andrew Yip

unread,
Jun 26, 2019, 3:34:49 PM6/26/19
to PDFTron WebViewer
Hi David,

Sorry for the wait but here a fix for the issues you mention. 

https://pdftron.s3.amazonaws.com/custom/ID-zJWLuhTffd3c/WebViewer/WebViewer_5.1.6_iOSFix.zip

This fix will try to clear cache and recover after the memory limit has  been hit. Also the UI has been updated to have some scroll locking to make vertical/horizontal scrolling more smooth.

Please let me know how it works for you

David Compton

unread,
Jun 28, 2019, 12:22:28 PM6/28/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

Thanks for the update.  We've put the scrolling on a couple of iPads through quite a bit of testing.  We were not able to get it to crash or show blank pages while scrolling.  So as far as we can tell the issue seems to be sorted out.  This is a great result - thanks for pursuing this to get a resolution.

When I built this I used the core from the version 5.1.6 that you sent me, but I webviewerui (i.e. the contents of ui/build) was built from the GitHub repository plus my customisations.  Is that OK - was there anything that you did in UI that would not be in the Github repository?

And finally there was one problem that we did notice in regards to the free text annotation changes and the recent change to auto-sizing - that only seems to affect iOS.  I will send through a video of that early next week so that you can see the problem and investigate.

Have a good weekend.

Kind regards,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.

For more options, visit https://groups.google.com/d/optout.


--
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Andrew Yip

unread,
Jun 28, 2019, 8:19:43 PM6/28/19
to pdfnet-w...@googlegroups.com
Hi David,

I'm glad that the issue with WebViewer crashing on iOS seem to be resolved. For the vertical scrolling issue you mention earlier, I changed some of the touch behavior to make it 'lock' for vertical and horizontal swiping. You can replace your 'ui/src/helpers/TouchEventManager.js' file with the attached one and build a new 'webviewer.min.js' file and to see the change. This change isn't in the Github repository yet, I'm waiting for the change to be reviewed by other developers (and maybe our UX team) before merging it in. 

I'll take a look at the other issue when you send the video.

Have a good weekend too!
TouchEventManager.js

David Compton

unread,
Jul 2, 2019, 1:45:07 PM7/2/19
to PDFTron WebViewer on behalf of Andrew Yip
We used your modified TouchEventManager.js.  We are happy with the locking behaviour - thank you.  Let us know when it makes it into the Github repository.  For the moment it is just part of our own customised build.

Here is a link to a video showing the FreeText annotation problem (there is audio explaining what is happening):


You will see that the FreeText annotations are basically broken.

Kind regards,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.

For more options, visit https://groups.google.com/d/optout.


--

David Compton

unread,
Jul 8, 2019, 3:24:25 PM7/8/19
to PDFTron WebViewer on behalf of Andrew Yip
Just wondering if you've had a chance to investigate the Free Text annotation issue.  We cannot release the scrolling fix for iOS until this issue is resolved.

Kind regards,

David
--

Andrew Yip

unread,
Jul 8, 2019, 5:10:02 PM7/8/19
to PDFTron WebViewer
Hi David,

Sorry for the late reply and thank you for the video, it was helpful for seeing the issue.  I was able to reproduce the free text tool breaking. It seems the tool was getting stuck in an invalid state. The following is a fix that will keep the free text tool from getting into that state.

https://pdftron.s3.amazonaws.com/custom/ID-zJWLuhTffd3c/WebViewer/WebViewer_5.1.6_iOSFixV2.zip

I wasn't able to reproduce the resizing issue. Are you doing something special when the keyboard shows up and does it resize when using the comments or text search. I saw the link you posted in another discussion ( https://app.docsontap.com.au/ ) and wasn't able to see the resizing happening there, does it only happen when turning it into an app?

David Compton

unread,
Jul 9, 2019, 1:07:20 PM7/9/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

The free text annotation problems only occur on iOS.  Not on the web version of our app and not on the Android version of our app.  All 3 versions are built from the same Ionic project.

I have the following file in my custom config file:

$(document).on('viewerLoaded', function() {
        var docViewer = readerControl.docViewer;

        docViewer.getTool('AnnotationCreateFreeText').setStyles(function(currentStyle) {
            return {
                StrokeThickness: 0,
                TextColor: new Annotations.Color(98, 115, 230),
                FontSize: '12pt'
            };
        });

        docViewer.on('toolModeUpdated', function() {
            setTimeout(function() {
                docViewer.getAnnotationManager().deselectAllAnnotations();
            }, 0);
        });
    });

The toolModeUpdated code was added to fix an issue with free text annotations - it was suggested by Justin in this thread:  https://groups.google.com/d/msg/pdfnet-webviewer/nehLAIUDTXQ/R-avrbQjBgAJ

Anyway your changes seem to have improved things.  The free text annotation now works - but only if the document is NOT in Fit Page mode.  So as long as you zoom in or choose Fit Width then the annotations work OK.  I've made another video showing you this:  https://www.dropbox.com/s/2qme9ki7wkplzx0/BAWW7342.MP4?dl=0

Hopefully we can sort out this final issue.

Kind regards,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.


--

Andrew Yip

unread,
Jul 10, 2019, 12:58:01 PM7/10/19
to PDFTron WebViewer
Hi David,

It looks like the default Cordova behavior is to resize the window when the keyboard shows up (normal behavior is having the keyboard cover the screen and shifting the screen up if the keyboard is covering the input). This resizing with "fit to page" set is what causing a rerender that results in the text disappearing. The following is a fix that tries to keep the free text visible and editable after the resizing happens. 

https://pdftron.s3.amazonaws.com/custom/ID-zJWLuhTffd3c/WebViewer/WebViewer_5.1.6_iOSFixV3.zip

Please let me know if the above fix works.

David Compton

unread,
Jul 17, 2019, 12:35:33 PM7/17/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

Thanks for the update.  However it didn't really help. I tried the following:  Installed the update you provided - as before I used your Core plus webviewer.min.js, the UI that I build from the GitHub repository plus your TouchEventManager.js.

So I decided to go back to WebViewer_5.1.6_iOSFixV2.  

I then found that updating the  cordova-plugin-ionic-webview to version 2.5.1 and cordova-plugin-ionic-keyboard to version 2.1.3 - allowed me to set the following preference:  <preference name="KeyboardResize" value="false" />.  This seems to have fixed up the resizing problem.  So now the free text annotation is working pretty well in iOS in fit page mode.  Sometimes the "insert text here" is not selected when you add a new annotation.  I guess we might have to live with that.

Anyway the change to the ionic-webview plugin seems to have caused me some other problems which I'm trying to fix now before I can release.  But at least we seem to have made progress with the free text annotations.

Kind regards,

David


--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.


--

Andrew Yip

unread,
Jul 19, 2019, 9:24:13 PM7/19/19
to PDFTron WebViewer
Hi David,

I'm glad to hear that it sounds like you made progress with the free text annotations. When you say 'Sometimes the "insert text here" is not selected....', do you have an example of when 'sometimes' is. I'm having some issues with reproducing it. 

David Compton

unread,
Jul 24, 2019, 1:35:26 PM7/24/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

I've made further package and plugin updates to my Ionic project.  The problem with "insert text here" seems to have gone now.  I'll keep an eye on it and let you know if it resurfaces.

Kind regards,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.


--

David Compton

unread,
Aug 15, 2019, 5:13:51 PM8/15/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

I want to update to version 5.2.0.  I just wanted to be sure that all of the "fixes" that you provided in this thread are included in 5.2.0.  That means:
  1. WebViewer_5.1.6_iOSFixV2 provided by you on July 9
  2.  'ui/src/helpers/TouchEventManager.js' provided by on on June 29

Kind regards,

David


--
Message has been deleted
Message has been deleted

Andrew Yip

unread,
Aug 15, 2019, 5:54:24 PM8/15/19
to pdfnet-w...@googlegroups.com
Hi David,

For the 5.2 release, the fix for iOS is in it, however the update for touchEventManager isn't yet ( it's still waiting to be reviewed and approved before merging it in). I'll attached the latest copy of the 'touchEventManager.js' to this post (this file is waiting to be approved).

I'll let you know when the updated 'touchEventManager.js' file is merged in, I think I can get it reviewed soon 
TouchEventManager.js.txt

Andrew Yip

unread,
Aug 15, 2019, 8:03:53 PM8/15/19
to PDFTron WebViewer
Hi David,

The touch update has been merged into our master branch.  You can find it in the link below
https://pdftron.s3.amazonaws.com/custom/ID-zJWLuhTffd3c/WebViewer/WebViewer_5.2.0_TouchUpdate.zip

Please let me know if the build works for you or if you have any other questions. 

David Compton

unread,
Aug 16, 2019, 2:30:54 PM8/16/19
to PDFTron WebViewer on behalf of Andrew Yip
Thanks Andrew - appreciate you dealing with that so quickly.  I'll let you know how it goes.

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.


--

David Compton

unread,
Aug 23, 2019, 12:33:48 PM8/23/19
to PDFTron WebViewer on behalf of Andrew Yip
Hi Andrew,

I just used the latest from the Github repository - that seemed to have the touch update in it.  I've tested in the browser and on an iPad.  All looks good.  I also found that a couple of other fixes that I'd needed to add manually to the UI code in the past, in relation to free text annotations and a page slider that we'd added to the toolbar, were no longer needed.  So that is all good as well.

Kind regards,

David
--

Andrew Yip

unread,
Aug 26, 2019, 4:09:24 PM8/26/19
to PDFTron WebViewer
Hi David,

I'm glad that everything seems to be working for you. Feel free to let us know if you run into anything else or if you have any other related questions,

Reply all
Reply to author
Forward
0 new messages