Open NinuuX opened 3 years ago
Did you check the sample? You need to implement OnLoadCompleteListener in your activity then add .onLoad(this). Implement the callback like shown below:
public class PDFViewActivity extends AppCompatActivity implements OnLoadCompleteListener { ...... ...... }
change your code for pdf view to the code below:
pDFView.fromBytes( decrypt(buttonId, mac_address) ) .pageFitPolicy(FitPolicy.WIDTH) .fitEachPage(true) .enableDoubletap(false) .enableAntialiasing(true) .spacing(0) .autoSpacing(false) .nightMode(false) .onLoad(this) .load();
That is all that is need to have loadComplete callback work perfectly.
I'm trying to get the ToC for using it within my app, but the loadComplete never fired.. Can someone help me plz ?