Display two PDFs side by side - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: Display two PDFs side by side

Display two PDFs side by side 3 years 1 week ago #9791

  • emilof
  • emilof's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

Display two PDFs side by side 3 years 1 week ago #9800

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
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:
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)];
    }

Please Log in or Create an account to join the conversation.

Display two PDFs side by side 3 years 1 week ago #9801

  • emilof
  • emilof's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Display two PDFs side by side 3 years 1 week ago #9802

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
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.

Please Log in or Create an account to join the conversation.

Display two PDFs side by side 3 years 1 week ago #9807

  • emilof
  • emilof's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
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"?

Please Log in or Create an account to join the conversation.

Display two PDFs side by side 3 years 1 week ago #9808

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum