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

Lib abilities

More
IP: 192.168.0.71 11 years 8 months ago - 11 years 8 months ago #6836 by Dmitry Kazakov
Replied by Dmitry Kazakov on topic Lib abilities
Well, when I wrote:

It seems that app doesn’t support this automatically. Can you tell me which part of code is responsible for this?

I mean that I had hide an action bar but free sapce was not occupied by pdf -- it was filled by greay background.
So my questions is it possbile to fill all space with pdf content? Do I nned to modify NDK code?

Global.default_config..

Where I can find this file? I see only Global class in com.radaee.pdf package
Last edit: 11 years 8 months ago by .
More
IP: 192.168.0.71 11 years 8 months ago #6845 by nermeen
Replied by nermeen on topic Lib abilities
default_config is a method inside Global class.

You need to rerender the page after hiding the actionbar, to recalculate the render variables. (m_view.vRenderAsync(page);)
More
IP: 192.168.0.71 11 years 8 months ago #6847 by Dmitry Kazakov
Replied by Dmitry Kazakov on topic Lib abilities
chnaging values inside this method has not affect pdf viewer.

can not find render async method in classes involved in demo project nor in com.radaee.view package.

Post demo code to make it clear.

public class MainActivity extends Activity
{
private ReaderController m_vPDF = null;
private Document m_doc = new Document();
// private PDFHttpStream m_stream = new PDFHttpStream();

private PDFFileStream stream = new PDFFileStream();

@Override
protected void onCreate(Bundle savedInstanceState)
{

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);



Global.Init( this );
m_vPDF = new ReaderController(this);
m_doc.Close();
// m_stream. open(" www.androidpdf.mobi/docs/MRBrochoure.pdf ");
//m_stream.open(" www.radaee.com/files/test.pdf ");
String str = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
stream.open(str + "/test.pdf");
int ret = m_doc.OpenStream(stream/*m_stream*/, null);
switch( ret )
{
case -1://need input password
finish();
break;
case -2://unknown encryption
finish();
break;
case -3://damaged or invalid format
finish();
break;
case -10://access denied or invalid file path
finish();
break;
case 0://succeeded, and continue
break;
default://unknown error
finish();
break;
}

if( ret == 0 )
{
m_vPDF.open(m_doc);
setContentView( m_vPDF );
}
}

@Override
public void onDestroy()
{
if( m_vPDF != null )
{
m_vPDF.close();
m_vPDF = null;
}
if( m_doc != null )
{
m_doc.Close();
m_doc = null;
}
// if( m_stream != null )
// {
// m_stream.close();
// m_stream = null;
// }
if( stream != null )
{
stream.close();
stream = null;
}
Global.RemoveTmp();
super.onDestroy();
}

}

More
IP: 192.168.0.71 11 years 8 months ago #6848 by nermeen
Replied by nermeen on topic Lib abilities
You are using the wrong demo app, PDFHttpDemo is only to show how to open a pdf from remote url, it does not implement all the features.

You need to check the general demo project PDFViewerxxx, inside that you will find all the methods i told you about
More
IP: 192.168.0.71 11 years 8 months ago #6851 by Dmitry Kazakov
Replied by Dmitry Kazakov on topic Lib abilities
Thanks, I found what I need.

Unfortunatly app crashes with pdf with two pages as an inforgaphics and text as well. I have added onTrim call listener and see app receives TRIM_MEMORY_RUNNING_CRITICAL when a look trough pages with zoom.
Time to create page: 0.407 seconds
Powered by Kunena Forum