Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

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

  • exit_music
  • exit_music's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 9 years 9 months ago #6562

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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 9 years 9 months ago #6563

  • exit_music
  • exit_music's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 6 years 1 month ago #13599

  • cmahoney52
  • cmahoney52's Avatar
  • Offline
  • New Member
  • New Member
  • 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