Displaying pdf one page at a time on Android - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Displaying pdf one page at a time on Android

Displaying pdf one page at a time on Android 4 years 4 months ago #6557

  • exit_music
  • exit_music's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
I would like to know if there is a way to display a pdf one page at a time (similarly to the PDFViewDual, except that two pages are not stuck together). Can I use the PDFViewDual class but somehow only show 1 page? I have tried the PDFViewHorz class, but this seems to stitch all the pages together without a gap between them. I have also tried the base PDFView class, but this just does not seem to show anything (maybe there is a method I need to call with this class?)

Any help here would be greatly appreciated
The topic has been locked.

Displaying pdf one page at a time on Android 4 years 4 months ago #6562

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
You can achieve this by setting def_view = 3 in Global.default_config...

in this mode, the PDFViewDual is modified as:
PDFViewDual view = new PDFViewDual(this.getContext());
boolean paras[] = new boolean[m_doc.GetPageCount()];
int cur = 0;
while( cur < paras.length ) {
      paras[cur] = false;
      cur++;
}
view.vSetLayoutPara(null, paras, m_rtol);
The following user(s) said Thank You: liyanli
The topic has been locked.

Displaying pdf one page at a time on Android 4 years 4 months ago #6563

  • exit_music
  • exit_music's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
I no idea whats going on with this code, but it did seem to work
The topic has been locked.

Displaying pdf one page at a time on Android 7 months 4 weeks ago #13599

  • cmahoney52
  • cmahoney52's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 2
For those wanting to display one page at a time now, this can be accomplished by using PDFLayoutView.
pdfView.PDFOpen(document, callback); // open the PDF
pdfView.PDFSetView(3); // horizontal scroll, single page at a time
The following user(s) said Thank You: Davide
The topic has been locked.
  • Page:
  • 1
Powered by Kunena Forum