Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Displaying pdf one page at a time on Android

More
IP: 192.168.0.71 12 years 2 months ago #6557 by exit_music
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
More
IP: 192.168.0.158 12 years 2 months ago #6562 by nermeen
You can achieve this by setting def_view = 3 in Global.default_config...

in this mode, the PDFViewDual is modified as:
Code:
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);
More
IP: 192.168.0.71 12 years 2 months ago #6563 by exit_music
I no idea whats going on with this code, but it did seem to work
More
IP: 192.168.0.71 8 years 6 months ago #13599 by cmahoney52
For those wanting to display one page at a time now, this can be accomplished by using PDFLayoutView.
Code:
pdfView.PDFOpen(document, callback); // open the PDF pdfView.PDFSetView(3); // horizontal scroll, single page at a time
Time to create page: 0.400 seconds
Powered by Kunena Forum