PDFViewCtrl flickering when call UpdatePageLayout

16 views
Skip to first unread message

Tuan Tran

unread,
Apr 22, 2016, 2:11:11 PM4/22/16
to PDFTron PDFNet SDK
Hello,

I'm using PDFNet Windows 10 Universal App 6.5.3.42683
I have about 50 or more separated PDF pages. And to display them on screen, I combine them with PagePushBack method

Then, to update the layout, I call UpdatePageLayout on PDFViewCtrl

The first problem is after calling UpdatePageLayout, the PDFViewCtrl display blank. To fix this problem, I call PropertyChanged on PDFViewCtrl in ViewModel

Since I have 50 PDF pages on the server, and I have to download them in a queue. To reduce the wait time from downloading to reading PDF, I set PDFDoc on PDFViewCtrl as soon as the first page downloaded, then every time a page finish downloading, i add them to PDFDoc by PagePushBack and call UpdatePageLayout and PropertyChanged.

Then the second problem. The PDFViewCtrl flick every time I call UpdatePageLayout and PropertyChanged.

So how to prevent the flickering? Thanks in advanced.

Ryan

unread,
Apr 25, 2016, 4:30:39 PM4/25/16
to PDFTron PDFNet SDK
Thank you for the feedback. There is no way to avoid the "flicker" as PDFViewCtrl needs to discard everything that it had before and start over, since the document pagination changed.

Please note, if you are not doing so already, you need to call PDFViewCtrl.DocLock and PDFViewCtrl.DocUnlock before adding the new pages, while viewing.
Reply all
Reply to author
Forward
0 new messages