Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

Migrate to 3.0? 6 years 1 week ago #13695

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 56
  • Thank you received: 1
I'm using an old version 2.x of the Android SDK and would like to update to the latest version. Is there a migration guide available somewhere to install the new files and remove old files that aren't needed?

I currently have source code in com/radaee/* (five subdirectories), plus four versions of the librdpdf.so file. It looks like current versions use a .jar file, but what does that replace? Do I take out the librdpdf.so files, add the .jar file, and replace all the source code? Should I take the source code from PDFReader, RDPDFReader or ViewLib in the current (3.15) download?

I have made customizations to a few of the source code files, most significantly in PDFReader, so I'll need to merge my customizations into the new files.

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

Migrate to 3.0? 6 years 1 week ago #13696

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
first of all I suggest you to download and check the last version of the library to better understand how it works.
2.x is a very old version and the SDK has changed massively since then.
PDFReader module has been deprecated, so you need to migrate to PDFLayoutView (used in the RDPDFReader module) that improves the performance, has higher zoom levels, new features and methods.

If you have a professional or a premium license you can remove the jar and use the source files as written here : www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=2

For the customizations you have done, you need to re-add them to the equivalent PDFLayout and PDFLayoutView

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

Migrate to 3.0? 6 years 1 week ago #13700

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 56
  • Thank you received: 1
Okay, I've replaced the 2.x source code and jniLibs in my project with the 3.15 code and libs. I have two questions now:

1) Most of my customizations involved programmatically scrolling the PDF display -- so I've added methods like PDFGetX() and PDFSetX(x) to PDFReader. Are these features built into the SDK now, or will I still need to manage that myself?

2) All the new source files are trying to import a package com.radaee.viewlib. I can't find this in the default 3.15 download or the additional source code download. How can I add this file to my project so I can build and run the project?

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

Migrate to 3.0? 6 years 1 week ago #13702

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
in the PDFLayoutView you will find the PDFGetX() method, you can add the PDFSetX(x) method that calls m_layout.vSetX(x).

Regarding the second question, can you please send us the complete log error you get?
Remember to update even the jar file (ViewLib\libs\com.radaee.view.jar)

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

Migrate to 3.0? 6 years 1 week ago #13703

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 56
  • Thank you received: 1
I just added the jar file -- I didn't have that before because I thought it wasn't needed with the source code installed -- but the problem is the same. The build error says "package com.radaee.viewlib doesn't exist." I'm attaching a screen shot.

I've added all the Java classes from ViewLib/source/main/java, the libraries from ViewLib/source/main/jniLibs and the jar file from ViewLib/libs. It seems like I'm missing a file, but I searched 3.15 download and don't see any files named viewlib.
Attachments:

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

Migrate to 3.0? 6 years 1 week ago #13704

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
as written here www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=2 if you have the source code, you have to remove the jar and its references.

Regarding the screenshot, you have to remove the line 52, after that, Android Studio will import the R file automatically and if you don't have bad xml, res or other the app will run.

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

Powered by Kunena Forum