Blurry or missing pages in Cordova, iOS 12

373 views
Skip to first unread message

Justin Jung

unread,
Nov 8, 2018, 1:37:57 PM11/8/18
to PDFTron WebViewer
After iOS 12 has released, there has been a few users reporting blurry or missing page issues in Cordova, iOS 12.
We did some searching, and found an article saying iOS 12 has greatly decreased canvas limit, breaking a number of web apps.


We are investigating how we could reduce the canvas memory even further on our end.
Meanwhile, you can try setting canvas multiplier to a value less than 2 as a workaround. For example, in your config.js:

window.utils.setCanvasMultiplier(1.5);

Please note that manually lowering the canvas multiplier will make the text rendering not as sharp.

Justin Jung
Software Developer
PDFTron Systems Inc.

David Compton

unread,
Nov 19, 2018, 3:54:18 PM11/19/18
to pdfnet-w...@googlegroups.com
Hi Justin,

How are you going with reducing the canvas memory requirements of the web viewer.  As discussed in our original thread we had to reduce the canvas multiplier to 1 to completely avoid blurry or missing pages.  Unfortunately this impacts negatively on the clarity of the xod document in the viewer.  We've delayed making a new release of our product containing version 4.0 of the web viewer in the hope that you might have a solution that deals with the canvas multiplier issue without loosing document clarity.

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.

Justin Jung

unread,
Nov 21, 2018, 2:39:37 PM11/21/18
to pdfnet-w...@googlegroups.com
Hello David,

Thank you for your patience.
We are investigating different approaches to reduce the canvas memory usage.
We did find out the maximum canvas dimensions that's below the limit, but achieving that requires changes in logic behind document/annotation rendering, which could easily introduce negative side effects.
We think we would have more information by next week.

David Compton

unread,
Dec 4, 2018, 2:30:16 PM12/4/18
to pdfnet-w...@googlegroups.com
Hi Justin,

I don't like to pester you about this issue, but we need to make a decision on whether to release an update with the canvas multiplier set to 1 (and the resulting lack in quality) or wait a bit longer until you have a resolution.  I do understand that Apple have caused this glitch, not PDFTron.  Any idea on whether you are likely to have an update to deal with the issue in the next few days?

Kind regards,

David

--

Justin Jung

unread,
Dec 5, 2018, 8:07:37 PM12/5/18
to PDFTron WebViewer
Hi David,

No problem. We are currently still investigating workarounds, and we likely won't have a stable build ready for the end of this week.
The issue seems to be related to a possible Safari bug with canvas garbage collecting, so we submitted a bug report to Apple and we are attempting to make some changes to WebViewer core, hoping to work around it.
Thanks for your patience.

Justin Jung

unread,
Dec 17, 2018, 6:24:12 PM12/17/18
to PDFTron WebViewer
Hi David,

Thank you for your patience. We have came up with a temporary solution for this issue: https://www.pdftron.com/ID-zJWLuhTffd3c/WebViewer/WebViewer_4.0.3.68908_cordova_ios12.zip
Please let us know if you run into any side effects.

David Compton

unread,
Dec 26, 2018, 1:07:14 PM12/26/18
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I was away last week - just taking a look at this now.  I ended up going straight to version 4.1 (rather than using the build above) as the release notes indicate that it includes the fix for the iOS 12 low canvas memory limit issue.  Unfortunately the first document that I tried I got blurry pages and blank pages just by simply scrolling the pages of a document on my iPad.  I've just tried a second document and got the same problem - all that I need to do is to swipe up and down through the pages - it is not even necessary to swipe quickly.   As far as I can see this issue is not fixed in v4.1.

NB I've now also tried the build that you sent on 18/12 (https://www.pdftron.com/ID-zJWLuhTffd3c/WebViewer/WebViewer_4.0.3.68908_cordova_ios12.zip) and it exhibits exactly the same problems.

Where do we go from here?

Kind regards,

David

--

Justin Jung

unread,
Dec 26, 2018, 1:28:16 PM12/26/18
to PDFTron WebViewer
Hi David,

If the version is properly updated, you should see continuous mode disabled from the UI and it says in a non-continuous mode unless changed programatically (and we highly recommend for iOS devices to stay in non-continuous).
If you still observe the issue in non-continuous mode, could you send us the document that you were testing with?

David Compton

unread,
Dec 26, 2018, 4:14:04 PM12/26/18
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I tried 3 different builds:

* 4.1
* 4.0.3.68908.
* A custom build of the UI that I built from the GitHub repo to implement the printing changes for Cordova

In all of these builds continuous mode was still enabled on iOS 12 (well actually it is iOS 12.1 on my test iPad - I have not yet updated to 12.1.1).

Something is not adding up?

Regards,

David


--

Justin Jung

unread,
Dec 28, 2018, 2:35:35 PM12/28/18
to PDFTron WebViewer
Hmm we have hard time reproducing the issue on our end.
Could you try our cordova project repo and see if you can still reproduce it?
The repo contains a script that downloads latest WebViewer into the project.

David Compton

unread,
Jan 2, 2019, 12:41:47 PM1/2/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Unfortunately the cordova project installation fails on both Windows and Mac after it downloads WebViewer and I provide my license key.  I've attached the log output from Windows.  "npm start" then fails so I cannot try out this project.  

Seeing as the download of the latest WebViewer into the cordova project did work I copied that into my own project to try building with that.  However that did not work - something was screwed up with the path and it kept inserting 'ui/build' into the path. So I reverted to the 4.1 download and the path issues went away.  Then I downloaded directly from https://www.pdftron.com/downloads/WebViewer.zip and the path issues with ui/build returned.  What is going on?

Kind regards,

David



--
2019-01-01T23_53_11_719Z-debug.log

Justin Jung

unread,
Jan 2, 2019, 7:29:03 PM1/2/19
to PDFTron WebViewer
Hi David,

The path issue seems to be a regression from us. We've fixed it and have updated the package.
With the newest WebViewer, you should see the continuous mode disabled in iOS devices. You can easily test it with Chrome's device toolbar and set the device to iPad or iPhone.
And if the continuous mode is disabled, then hopefully the rendering issue in iOS should all be resolved.

Screen Shot 2019-01-02 at 4.24.03 PM.png

David Compton

unread,
Jan 3, 2019, 12:56:38 PM1/3/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I've downloaded the latest WebViewer and that fixed the path issue - thank you.  I'm also no longer seeing the Page Transition options in the browser when I choose one of the iOS devices using Chrome's device toolbar - so that much is working.  However - my document still scrolls continuously regardless.  I'm not setting the page transition programatically (I double checked my code for any calls to setLayoutMode).  I tried this with both the UI build that comes with the latest WebViewer - and with the UI build that I've been creating from the GitHub repo.  I also verified this same behaviour on an Ionic build on an actual device (iPad Pro) - Page Transition options do not appear, however document still scrolls continuously.  As a result on the iPad I still get the blurry and missing pages.

I do not understand why continuous mode is disabled for you but not in my builds.  Where is the code that controls this - is it something that I can double check in the code from the GitHub repo that I am working with?   Let me know if there is anything I can send you or give you access to that might help to work out this issue.  I'm happy to do a TeamViewer session or something similar if that would help.  

Kind regards,

David

--

David Compton

unread,
Jan 3, 2019, 5:12:11 PM1/3/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Further to my last email, for my own sanity, I've just gone and checked the 3 builds that I did last week (see my post in this thread from 27th Dec.).  All of those builds exhibit exactly the same behaviour that I'm experiencing now i.e. Page Transition options do not appear on settings menu, however document still scrolls continuously and gives me blurry and missing pages.  I never knew to look for the Page Transitions options until your email yesterday - previously I was just checking whether the document was scrolling continuously or not.  

Kind regards,

David

Justin Jung

unread,
Jan 8, 2019, 1:17:35 PM1/8/19
to PDFTron WebViewer
Hi David,

It sounds like your app is triggering setLayoutMode (or setDisplayMode) function somewhere down the initial loading.
You could try debugging where the call is being made by putting a breakpoint on onDisplayModeUpdated.js, which is a callback fired for any display mode update.
To help you debug, you can enable source map in the webviewer-ui build by adding

devtool: 'cheap-module-eval-source-map'

to webpack.config.prod.js just like the one in webpack.config.dev.js.

David Compton

unread,
Jan 9, 2019, 12:14:37 PM1/9/19
to PDFTron WebViewer on behalf of Justin Jung, Michael Craig, Sam Beydoun
Hi Justin,

I cannot find anywhere that my code is triggering setLayoutMode or setDisplayMode.  Anyway I have ended up using the following code to switch force Continuous mode if the user is on an iOS device.

          private isiOSDevice = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(<any>window).MSStream;
           .....................
          if (self.isiOSDevice) {
            self.webViewerInstance.setLayoutMode(self.webViewerInstance.LayoutMode.Continuous);
          }

I was expecting that this would finally solve the blurriness issue on iOS devices.  However to my frustration this is not the case.  I am still getting blurry pages.  To summarise here is the situation:

1.  Using latest UI code base from GitHub repository.
2.  Page Transition options do not appear on the Setting menu (as expected)
3.  Document is being manually set to LayoutMode.Continuous as per my code above (noting that I should not need to be setting the LayoutMode manually)
4.  Pages still appearing blurry after swiping through just a few pages.  
5.  The blurriness happens whether or not the files are being loaded from local copies stored on the device or from our server using range requests.

I understand that this problem has been caused by a change made by Apple.  I also understand that PDFTron have been trying to provide a solution to overcome this problem.  However this has now been going on for over 2 months and yet still we have been unable to find a resolution.  We have spent many hours debugging and trying various potential fixes.  We have been promising our customers an update for some time now and it is getting beyond where we can continue to make excuses and delay things.  We really need a solution to this issue.  Maybe there is something that I am doing wrong - I'm not discounting that possibility.  But we just need some way to get this fixed and quickly.  What can we do to debug and get this issue sorted.  Once again I will say that I'm happy to provide you access to our code base - or to do a Team Viewer session - or a Skype call.  Just let me know.  I just need a better way to get to the bottom of this issue than waiting 24 hours or more for each email and then not getting anywhere.

I apologise for the frustrated tone of this email.  I have been trying to be patient and persist for some time now.  I do appreciate the efforts that you've gone to in order to find a solution.  But I do need you (i.e. PDFTron) to understand that this is an issue that we must have resolved soon.

Kind regards,

David Compton

--

Justin Jung

unread,
Jan 9, 2019, 12:33:50 PM1/9/19
to PDFTron WebViewer
Hi David,

Yes it looks like we could help you resolve the issue much faster with a call session.
I think Google Hangout would be the simplest without any extra setup. Would you be ok with that?
Could you also let me know the timezone you are at so that we could arrange a time?
We are at Vancouver, BC Canada (PST) and we are available anytime between 9am to 5pm.

David Compton

unread,
Jan 9, 2019, 4:26:06 PM1/9/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Yes Google Hangouts is fine with me.  I'm in Australian timezone but I'm pretty flexible with time as I work from a home office - anytime after 10 am your time would work for me.  I am available this afternoon (your time) if that suits you?  Otherwise anytime tomorrow after 10 am your time.  Just let me know.

What are you expecting on this end.  I normally develop on Windows - my iOS builds are done using an Ionic service.  I do have a Mac but only use that when I need to for debugging purposes for iOS.  Do you want me to be on the Mac?

Kind regards,

David

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.


--

Justin Jung

unread,
Jan 9, 2019, 4:30:08 PM1/9/19
to PDFTron WebViewer
Hi David,

Great! How does 10am on your time (3pm PST) today sound to you?
If not, same time tomorrow will work for me as well.
You could add me in the hangout: jj...@pdftron.com

David Compton

unread,
Jan 9, 2019, 4:35:43 PM1/9/19
to PDFTron WebViewer on behalf of Justin Jung
Yes 10 am today will work fine for me.  Do you want me on my Windows PC or my Mac?

--
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.


--

Justin Jung

unread,
Jan 9, 2019, 4:37:13 PM1/9/19
to PDFTron WebViewer
Awesome!
I think Mac would be better just in case we want to debug through Safari.

David Compton

unread,
Jan 10, 2019, 12:57:29 PM1/10/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Thanks for your time today.  Just a quick update.  It seems that the ServiceWorker caching was causing the problem with LayoutMode not being set to Single on iOS.  I've fixed this now in my code.   However I am still finding that I am getting blurry pages after swiping through a number of pages in Single mode on my iPad.  I have had a look in Safari debug and I notice that there are a large number of canvases appearing (~23) by the time the blurriness occurs.

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.


--

Justin Jung

unread,
Jan 10, 2019, 2:18:13 PM1/10/19
to PDFTron WebViewer
Hi David,

That's great!
We made some progress on our end too, where we did reproduce the issue of canvas not released properly.
We will investigate and hopefully have some good news until the follow-up call.

Justin Jung

unread,
Jan 18, 2019, 3:55:11 PM1/18/19
to PDFTron WebViewer
Hello David,

Thank you for your patience. We have updated WebViewer package with a new fix! https://www.pdftron.com/downloads/WebViewer.zip
We have tested page navigation, zooming, rotating and loading a second document and verified that number of canvases remain around 6 or 7 when inspected with Safari debugging tool.
Please let me know how this works for you, and if you have any further questions.

David Compton

unread,
Jan 22, 2019, 6:55:30 PM1/22/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

So is the "core" from this zip file fine to use with the latest UI from the GitHub repo?  

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.


--

Zhijie Zhang

unread,
Jan 23, 2019, 2:19:21 PM1/23/19
to PDFTron WebViewer
Hi David,

Yes, the core folder will work fine with the latest UI in the github repo.

Zhijie Zhang

David Compton

unread,
Jan 30, 2019, 12:03:56 PM1/30/19
to PDFTron WebViewer on behalf of Zhijie Zhang
Hi Justin,

Your latest change seems to have fixed the issue with the canvas memory on iOS while working in single page mode.  Thank you for sorting this out!

When we last spoke you indicated that you hoped to be able to also resolve this for continuous mode - you will remember that we discussed the need for continuous view for iPad customers that use their iPads with keyboards in landscape mode.  When do you think you are likely to have a resolution for this?

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.


--

Zhijie Zhang

unread,
Jan 31, 2019, 2:20:56 PM1/31/19
to PDFTron WebViewer
Hi David,

Working around the memory issues for continuous mode seems to be quite a bit trickier than non-continuous mode, so it is difficult to say when we will have a resolution for this.
We will let you know when we have any updates. Thanks so much for your patience!

David Compton

unread,
Feb 4, 2019, 12:19:54 PM2/4/19
to PDFTron WebViewer on behalf of Zhijie Zhang, Michael Craig, Caroline Layton
Hi Zhijie,

Thanks for your reply.  

Firstly I just want to reiterate that having the web viewer working in continuous mode on iOS is very important to us and our customers.  We have some customers who have been using our product on iOS for 6 or 7 years (originally using the native SDK).  They have always had continuous mode available to them.  We are going to get some negative feedback when we make a release without continuous mode.

Secondly I need to raise a new issue that I've come across as I've been testing the changes made to fix the blurriness in single page mode.  What I'm finding is that when you have the device in landscape mode and the document layout set to fit width, then when scrolling the page using your finger you get a lot of flickering and a "jerky" feeling.  This happens when you leave your finger touching while scrolling.  I'm not able to release this to our users with this problem existing.  Can you please investigate and hopefully provide a fix for this 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.
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.


--

Zhijie Zhang

unread,
Feb 6, 2019, 8:35:06 PM2/6/19
to PDFTron WebViewer
Hi David,

Thanks for letting us know how important continuous mode is to your users. We understand how it would be frustrating for them to lose this capability. 

For your second issue, we were able to reproduce it. A fix has been pushed to the webviewer-ui master so you can pull from it. You can also download the attached bundle file which contains the fix. 

Thanks,
webviewer-ui.min.js.txt

David Compton

unread,
Feb 7, 2019, 6:56:43 PM2/7/19
to PDFTron WebViewer on behalf of Zhijie Zhang
Hi Zhijie,

Thanks for your fix for the flickering when scrolling the page.  That issue now seems to be resolved.  However the impact of that seems to be that you can no longer swipe and have the page scroll freely to the top or bottom in single page mode, or over multiple pages in continuous mode.  This seems to impact all platforms, not just iOS.  Two examples:

1.  In single page mode with fit width in landscape mode on an iPad, I was previously able to swipe quickly to the top or bottom of the page with a single quick swipe motion. This is no longer possible, now it would take at least two swipes to get from the top to the bottom of the page - or vice versa.  And the movement feels like the page gets "stuck", or encounters friction that slows it down, when you swipe.
2.  In continuous mode I was previously able to swipe quickly up or down a couple of times and scroll through multiple pages at a time.  This is no longer possible.  

So in short it seems like in fixing one issue we've caused a different problem that may well be worse than the original problem.

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.


--

Zhijie Zhang

unread,
Feb 12, 2019, 8:19:04 PM2/12/19
to PDFTron WebViewer
Hi David,

Sorry for the delay in our response.

Please find the attached bundle file which contains the fix for the document flickering issue. This fix has also been merged into webviewer-ui master branch.
Please note that we worked around the issue by disabling native browser momentum scrolling and simulating it using touch events. From our testing it seems to work well but we will also be investigating other ways to address the issue.
Thanks for your patience.

Best Regards,
webviewer-ui.min.js.txt

David Compton

unread,
Feb 15, 2019, 12:31:18 PM2/15/19
to PDFTron WebViewer on behalf of Zhijie Zhang
Hi Zhijie,

Your latest fix does seem to have resolved the problems we were experiencing with document flickering and scrolling using swipe touches.  Thank you very much.

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,
Apr 2, 2019, 2:25:25 PM4/2/19
to PDFTron WebViewer on behalf of Zhijie Zhang
I'm just following up to see if you have made any progress in relation to:

1. Re-enabling continuous mode on iOS without the canvas memory problems.
2. Improving scrolling and swiping behaviour in the viewer.  Neither of these features work that well in iOS and are detracting from the quality of our application.

Kind regards,

David Compton
--

Justin Jung

unread,
Apr 17, 2019, 5:43:48 PM4/17/19
to PDFTron WebViewer
Hi David,

Sorry for a delay in our response.
We have been trying different solutions to resolve the issue, but we didn't have much success in them.
As an alternative, we tried creating a Cordova wrapper for the native version to improve user experience in Cordova.
It will provide continuous scrolling and insulate you from any Apple WebView surprises going forward.
We are just finalizing it and we can send you something to test by tomorrow, latest by Friday.

Justin Jung

David Compton

unread,
Apr 17, 2019, 7:09:45 PM4/17/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Thanks for your reply.  Does that mean that your alternative doesn't use the web viewer - or am I misunderstanding?

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.


--

Justin Jung

unread,
Apr 17, 2019, 8:03:09 PM4/17/19
to PDFTron WebViewer
Hi David,

Yes, the possible alternative uses the iOS and Android native SDKs, accessed in Cordova via a cross-platform JavaScript API that has been designed to mirror WebViewer's. WebViewer itself would not be part of the app.
The advantage of this is that the PDF viewer would have native performance (including continuous scrolling and swipe animations), while the rest of the app would remain written in JavaScript. It would also enable the app to handle PDF documents directly, rather than using .xod files.
There would likely be some work involved here, depending on how much you have customized WebViewer and how annotations are handled. Our native Cordova plugin does not have as an extensive JavaScript API as WebViewer, and the feature sets are not identical, but we are interested improving the plugin so that it would work for apps like yours.

The first version of the plugin has just been finished and is available here: https://github.com/PDFTron/pdftron-cordova

If the native plugin is a direction that you would like to consider for your app, perhaps we can arrange a phone call to better understand how you're using WebViewer and to determine what work would need to be done to integrate the native plugin instead.
If you would prefer to stay with WebViewer, we will continue our investigations and provide an update soon.
Please let me know how you would like to proceed.

David Compton

unread,
Apr 18, 2019, 1:29:13 PM4/18/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Our app originally used your native SDKs.  We spent a lot of time rewriting the app to take advantage of web viewer so that we could have one code base that worked across all platforms - web as a PWA (for Windows and Mac devices), iOS and Android.  Also we are now only licensed for web viewer.  I'm not really keen on going back to having multiple code bases - nor writing another version of our app, or having to pay additional license fees for the Cordova plugin.  So my initial reaction is that I'm not keen on the Cordova plugin option. However I am prepared to have a phone call to discuss what would be involved and how it would work.

One thing that I have recently noticed is that Safari on iOS now seems to handle our app quite well as a PWA - directly in the browser.  Previously it didn't work that well but improvements to mobile Safari seem to have moved things in the right direction.  For example the problems that we experienced with free text annotations in our Ionic app on iOS did not occur in Safari on iOS.  Do you think that the scrolling issues will exist in Safari on iOS? 

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.


--

Justin Jung

unread,
Apr 18, 2019, 5:22:33 PM4/18/19
to PDFTron WebViewer
Hi David,

I understand, we can continue our investigation in WebViewer and let you know when we have updates.
When we were testing before, we were able to reproduce the issue on iOS Safari, but it was much harder than Cordova (canvas limit was higher).
It's a great news that you experienced improvements to mobile Safari, and I really hope that they totally resolve this issue but it's unlikely.
I apologize for this issue taking a long time to resolve. We will let you know when we have more information.

Justin Jung

unread,
Apr 24, 2019, 8:14:12 PM4/24/19
to PDFTron WebViewer
Hi David,

I just wanted to update you with some progress. 
I have a build that seems to work fine if you just scroll without changing the zoom level.
I have attached updated CoreControls and webviewer-ui bundle just in case you want to try out with different documents.
Next step is to investigate the canvas usage in zooming, but please let me know if you find any issues with the updated files when you scroll with​out zooming.
Thank you for your patience.
CoreControls.js.txt
webviewer-ui.min.js.txt

David Compton

unread,
Apr 26, 2019, 1:37:21 PM4/26/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Thanks for the update.  I will try this out early next week and let you know how it goes.

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.


--

Justin Jung

unread,
May 3, 2019, 3:21:20 PM5/3/19
to PDFTron WebViewer
Hi David,

Here is an updated build which seems to be working without any issue on our end.
Expected behavior:
​User can view documents without any problems in both continuous and non-continuous mode (in any zoom level)

Please let me know how they work for you.
If no issue is found, we will include it in our next release.

Best regards,
CoreControls.js.txt
webviewer-ui.min.js.txt

David Compton

unread,
May 6, 2019, 1:11:29 PM5/6/19
to PDFTron WebViewer on behalf of Justin Jung, Michael Craig
Hi Justin,

Thanks for this further update.  I've given it a try and I have been able to scroll in continuous mode without any memory problems on the iPad (very happy!!).  Thanks for persisting and getting it to this point - much appreciated.

I do have the following feedback/questions:

1.  Is it possible to have the scrolling work any smoother.  It works pretty well but seems a bit "janky".
2.  Can these changes (along with the free text annotation changes that Zhijie has been working on) be added to the Github repo - or do I have to wait for version 5.1 to be released?
3. This one may not be related to your changes.  After adding multiple annotations it occasionally (twice) became impossible to add any more annotations - this occurred with both free text and comment annotations.  I could move to a new page but the ability to add annotations stopped working - along with the ability to click on other buttons.   I have tried to replicate the problem since without success - so I cannot give you any more precise information.  I know that if you/we cannot reproduce this issue consistently then there is not going to be much you can do about it.  But I thought I would raise it anyway.  I also raised this same problem with Zhijie as I am working with him on a separate issue related to free text annotations on iOS - his changes were also in the patch you sent me.  

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,
May 9, 2019, 2:34:46 PM5/9/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I've been using the update with the continuous mode fix in normal usage of our app the last two days.  Here are some further problems that I have found (I've continued the numbering from my previous email):

4. If you use the page number box in the bottom right hand corner to change pages then the toolbar buttons all become unresponsive.  This is not intermittent - it happens consistently - even in single page mode.
5. I had a situation where after a short time, and only moving slowly from one page to the next, i.e. no big swiping to scroll multiple pages, 1/3 of the page I was on went blurry and all subsequent pages were blank.  This is the old problem resurfacing.  I had to restart the app to clear the problem.
6.  I've been able to experience again the problem where I could not annotate any more (issue 3 in my last email).
7.  Related to issue 1 in my previous email there is a fair bit of flashing of the images as you move between pages.  And the images are blurry as they come into view.  This is mostly noticeable using the viewer in fit-width continuous mode. 

I am using a large 470 page document with lots of images. - this particular document probably puts a fair bit of demand on the viewer - happy to send it to you if you want to try it out.

Kind regards,

David
--

Justin Jung

unread,
May 13, 2019, 12:15:18 PM5/13/19
to PDFTron WebViewer
Hi David,

I apologize for a delayed response.

1. Does the delay happen even when you don't have debugger running? If so, did you observe the same jankiness before the canvas bug was introduced?
2. The changes will be part of 5.1 for sure (which is going to happen in about a month), but I have also created a separate branch in ui for now: https://github.com/PDFTron/webviewer-ui/tree/ios-cordova
3. Unfortunately we never experienced that issue when we were testing. It could have been a conflict between Zhijie's and my change. Were you able to check for any error messages in console log when this has happened?
4. Thank you for reporting this. It sounds like it's a regression from UI, and we will resolve it as soon as possible.
5. Were you reproduce this issue consistently? If not, it could have been the cache from iOS.
6. I will talk to Zhijie and see if we can create a same UI bundle as you to reproduce this issue.
7. Does this happen in every zoom level, or zoom levels after some point? When a user is zoomed in far enough, we change our canvas rendering to render only visible part of the PDF, and redraw them when you move around. The blurry image shows up while the sharp image is rendered as a visual feedback for user, but it should switch to a sharp image after the rendering is done. It would be very helpful if you could send us the document that you were testing with.

I'm sorry for the delay again, we'll get your issues resolved soon.

David Compton

unread,
May 17, 2019, 12:26:51 PM5/17/19
to PDFTron WebViewer on behalf of Justin Jung
Thanks for your reply.  I will reply to your questions early next week.  I had fully intended on replying this week but unfortunately some other deadlines have prevented that.

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.


--

Justin Jung

unread,
May 17, 2019, 12:31:50 PM5/17/19
to PDFTron WebViewer
Hi David,

No problem.
I'm still working on to fix noticeable bugs in free text annotations, but some of them are only happening in Cordova so it's taking longer to investigate and fix.
Hopefully I can have better updates to you by next week.
Have a great weekend!

Best regards,

David Compton

unread,
May 23, 2019, 11:37:36 AM5/23/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

Answers to your questions below:

1. Does the delay happen even when you don't have debugger running? If so, did you observe the same jankiness before the canvas bug was introduced?  Yes the delay was happening even without the debugger running.  I don't think that the jankiness existed on the old webviewer UI in iOS (it did in Android, which I didn't worry so much about as most of our user base is Windows or Apple).  I'm not really sure if the jankiness coincided with the canvas bug.  I've been testing a bit more today on a pretty typical document for our users - 304 pages a mixture of text and images.  Scrolling seemed pretty good to be honest.  I then went back to my original test document, which is basically three images (slides) per page, and the jankiness returned.  So it seems to be more related to that specific document (it is the first one linked below).  So probably for most of our users normal usage the scrolling will be OK, although there may be problems on certain documents.  
2. The changes will be part of 5.1 for sure (which is going to happen in about a month), but I have also created a separate branch in ui for now: https://github.com/PDFTron/webviewer-ui/tree/ios-cordova  Thanks.
3. Unfortunately we never experienced that issue when we were testing. It could have been a conflict between Zhijie's and my change. Were you able to check for any error messages in console log when this has happened?  I was not able to check the console at the time.  I have not been able to reproduce this issue today so lets not worry too much about this unless it crops up again.
4. Thank you for reporting this. It sounds like it's a regression from UI, and we will resolve it as soon as possible.   Thanks.
5. Were you reproduce this issue consistently? If not, it could have been the cache from iOS.  I did get this to happen again a couple of times today.  Once when I had the "Fit to width" option selected and once when I didn't.  I was scrolling pretty aggressively through the document.
6. I will talk to Zhijie and see if we can create a same UI bundle as you to reproduce this issue.  I haven't been able to reproduce this issue again today.
7. Does this happen in every zoom level, or zoom levels after some point? When a user is zoomed in far enough, we change our canvas rendering to render only visible part of the PDF, and redraw them when you move around. The blurry image shows up while the sharp image is rendered as a visual feedback for user, but it should switch to a sharp image after the rendering is done. It would be very helpful if you could send us the document that you were testing with.   The problem seems to be mainly related to when the "Fit to width" option is selected - and was worse on the first test document below.

Here is the link to my test documents:


The main issues from the list above are numbers 4 & 5 - and to a lesser extent 1 & 7.

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.


--

Justin Jung

unread,
May 24, 2019, 5:13:34 PM5/24/19
to PDFTron WebViewer
Hi David,

Summarizing the remaining problems:

#5 - Pages being blurry when scrolling
#1 - Janky scrolling in some documents
#7 - Images flashing when scrolling

I have tested with the document you have attached, but I wasn't able to reproduce the problems above.
Scrolling was not the smoothest, but I thought the problems that you are reporting are more severe than that.

Just to clarify, the CoreControls that includes the iOS canvas bug fix was not in the 5.0 package until recently, so I would recommend to download the latest package once more to make sure that we are on the same page.
Also, please make sure to use the latest ui build from mater branch, and that you are not manually switching CachingLevel or PreRenderLevel of CoreControls in your app.
If the issue still persists, more details of how we could reproduce the issue on our end will be very helpful (device spec, documents, steps, etc).

I believe #4 is more closely related to the free text annotation issue, so I'll explain it further in https://groups.google.com/d/msg/pdfnet-webviewer/nehLAIUDTXQ/UycJvCwFBgAJ

David Compton

unread,
May 30, 2019, 5:21:04 PM5/30/19
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I was using the latest ui build from the master branch.  I'm not manually switching CachingLevel or PreRenderLevel.   I'm sure that I was using a build that contained the iOS canvas bug fix.

It is getting a little confusing as to what pieces to be using as I've been getting fixes from you and Matt for various issues.

How far off are we from getting the iOS continuous scrolling fix into the main branch so that I can test on that - and hopefully release it?

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.


--

Justin Jung

unread,
May 31, 2019, 3:34:32 PM5/31/19
to PDFTron WebViewer
Hi David,

We are aiming for a release in next week, and that will include the ios fix for sure.

Best Regards,
Reply all
Reply to author
Forward
0 new messages