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

TOPIC:

S 4 years 4 months ago #14765

  • AABBDD
  • AABBDD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
P

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

Last edit: by AABBDD.

No enough Information for developing 4 years 4 months ago #14766

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
sorry about that. it is no good guide, because our published demo has 3 level of components, the guide shall depends on your demand level.
some customer may not using activity directly.

1. the top level shall be using activity directly.
using parameter for activity com.radaee.reader.PDFGLViewAct:
String pdf_asset = intent.getStringExtra("PDFAsset");
String pdf_path = intent.getStringExtra("PDFPath");
String pdf_http = intent.getStringExtra("PDFHttp");

String pdf_pswd = intent.getStringExtra("PDFPswd");
there is 3 ways to open a PDF file:
"PDFAsset": asset path of PDF file in your project. example: "data/test.pdf"
"PDFPath": absolute file path of PDF file. (need sdcard permission, if PDF file not in sandbox)
"PDFHttp": url link for PDF file. (need network permission, and http header shall support byte range feature)

"PDFPswd" is the password to open PDF file.
customer operation can be implement in com.radaee.reader.PDFGLViewAct and com.radaee.reader.PDFViewController

2. the second level is Viewer level, invoke like:
m_view.PDFOpen(m_doc, new com.radaee.view.ILayoutView.PDFLayoutListener({//implement codes, ...}));//invoke in onCreate() of activity
m_view.PDFClose();//invoke in onDestroy() of activity
m_view is com.radaee.reader.PDFGLLayoutView.
m_doc is com.radaee.pdf.Document;
listener is com.radaee.view.ILayoutView.PDFLayoutListener;
all customer operation can implement in implement of com.radaee.view.ILayoutView.PDFLayoutListener;

3. the last level shall be native level.
Viewer level is based on native API.
it always start from com.radaee.pdf.Document;
example:
com.radaee.pdf.Document doc = new com.radaee.pdf.Document();
doc.Open("/sdcard/test.pdf", "password");
doc.Close();


at last, i shall say, you must invoke Global.Init() at Activity.onCreate() or any application entry to initialize global data.
and you shall configure your license in Global.Init(); about license key, the knowledge base should mentioned.
if Global.Init() already invoked succeed, this function will ignore second invoking.
The following user(s) said Thank You: AABBDD

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

Last edit: by radaee.
  • Page:
  • 1
Powered by Kunena Forum