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

Display two PDFs side by side

More
10 years 4 months ago #9791 by emilof
I have two PDF files. Each file only contain one page. I want to display them side by side when the device is in landscape mode. Is this possible?
More
10 years 4 months ago #9800 by emanuele
Hi,

on which platform are you working?

For iOS version is possible using two different instance of PDFView class and set the proper frame.
For example, in PDFOpen method (RDPDFViewController class) you can use something like:
Code:
if(SYS_VERSION>=7.0) { m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width / 2, rect.size.height)]; } else { m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width / 2, rect.size.height-20-44)]; } if(SYS_VERSION>=7.0) { m_view1 = [[PDFView alloc] initWithFrame:CGRectMake(rect.size.width / 2, 0, rect.size.width / 2, rect.size.height)]; } else { m_view1 = [[PDFView alloc] initWithFrame:CGRectMake(rect.size.width / 2, 0, rect.size.width / 2, rect.size.height-20-44)]; }
More
10 years 4 months ago #9801 by emilof
Sorry for not mentioning the platform. I'm on Android.

Will both views to zoom simultaneously in the example you provided? The PDFs should be laid out beside each other in the same "scroll view" and when zooming on the left one the right should also be zoomed aswell. They shall act as one large page.
More
10 years 4 months ago #9802 by Davide
Hi
it's possible to reproduce the events you make on one instace of the pdf reader to the other side programmatically, but they won't act as one large page.

However for Android I suggest you to make two instances of m_reader in PDFReaderAct and handle them as you want.
More
10 years 4 months ago #9807 by emilof
Will I still have the problem that the two pages wouldn't act as one if I decice to go forward with the solution using "two instances of m_reader in PDFReaderAct"?
More
10 years 4 months ago #9808 by Davide
Hi,
yes because they are two different instances, you have to handle them programmatically.
All the events (zoom, fling..) have to be passed and handled from one instance to the other.
Time to create page: 0.420 seconds
Powered by Kunena Forum