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

How to reload PDF

More
10 years 10 months ago #10015 by zadi
How to reload PDF was created by zadi
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!
More
10 years 10 months ago #10026 by Davide
Replied by Davide on topic How to reload PDF
Hi,
I suggest you to close the old instance of the document class:
Code:
//close if(m_doc != null) { m_view.PDFClose(); m_doc.Close(); m_doc = null; }

Then you can open a new instance of your document:
Code:
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..
Time to create page: 0.344 seconds
Powered by Kunena Forum