How to reload PDF - 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

TOPIC: How to reload PDF

How to reload PDF 2 years 10 months ago #10015

  • zadi
  • zadi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Hi, i want reload new pdf file without reload activity: now i con use this code:

Global.Init(this);
m_layout = (RelativeLayout) LayoutInflater.from(WebViee.this).inflate(
R.layout.action_bar_pdf, null);

m_view = (PDFLayoutView) m_layout.findViewById(R.id.webView1);
setContentView(m_layout);
m_doc = new Document();
int ret = m_doc.OpenMem(docu.getDocbyte(), "");
ProcessOpenResult(ret);
setContentView(m_layout);


how to load a new pdf from byte[]?

thx!

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

How to reload PDF 2 years 10 months ago #10026

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,
I suggest you to close the old instance of the document class:
//close
if(m_doc != null)
{
	m_view.PDFClose();
	m_doc.Close();
	m_doc = null;
}

Then you can open a new instance of your document:
m_doc = new Document();
int ret = m_doc.OpenMem(dewDocu.getDocbyte(), "");
ProcessOpenResult(ret);
setContentView(m_layout);

So you don't have to reload the activity..

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

  • Page:
  • 1
Powered by Kunena Forum