Adding annimation effects to mobile PDFVIewCtrl when rendering is finished


I am using PDFTron Mobile SDK on Android (and letter on iOS & WinRT).

Other question is if it’s possible to set a translate animation when rendering is finished?


The PDFViewCtrl does not have any animation implemented when rendering the pages, ie, once the page is rendered it will be displayed. Since PDFViewCtrl is a view, what you can try to do to achieve the animation is to use the Animation API that Android provides ( For example, you could extend the PDFViewCtrl.RenderingListener and override onRenderingFinished() with something like this (


public void onRenderingFinished() {

Animation fadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_fadein);




where anim.fadein.xml:

<?xml version="1.0" encoding="utf-8"?>

<alpha android:fromAlpha=“0.5” android:toAlpha=“1.0”



Keep in mind that this will apply the animation to the whole view. Also, it can be a little tricky since onRenderingFinished can be called several times.