- Posts: 5
- Thank you received: 0
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
- exit_music
- Topic Author
- Offline
- New Member
-
Less
More
IP: 192.168.0.71
12 years 2 months ago #6557
by exit_music
Displaying pdf one page at a time on Android was created 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
Any help here would be greatly appreciated
IP: 192.168.0.158
12 years 2 months ago #6562
by nermeen
Replied by nermeen on topic Displaying pdf one page at a time on Android
You can achieve this by setting def_view = 3 in Global.default_config...
in this mode, the PDFViewDual is modified as:
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);
- exit_music
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
IP: 192.168.0.71
12 years 2 months ago #6563
by exit_music
Replied by exit_music on topic Displaying pdf one page at a time on Android
I no idea whats going on with this code, but it did seem to work
- cmahoney52
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 2
IP: 192.168.0.71
8 years 6 months ago #13599
by cmahoney52
Replied by cmahoney52 on topic Displaying pdf one page at a time on Android
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