- Posts: 9
- 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
Display two PDFs side by side
10 years 4 months ago #9791
by emilof
Display two PDFs side by side was created 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?
10 years 4 months ago #9800
by emanuele
Replied by emanuele on topic Display two PDFs side by side
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:
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)];
}
10 years 4 months ago #9801
by emilof
Replied by emilof on topic Display two PDFs side by side
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.
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.
10 years 4 months ago #9802
by Davide
Replied by Davide on topic Display two PDFs side by side
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.
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.
10 years 4 months ago #9807
by emilof
Replied by emilof on topic Display two PDFs side by side
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"?
10 years 4 months ago #9808
by Davide
Replied by Davide on topic Display two PDFs side by side
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.
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