I should have made this clear in the OP, I'm reading the PDFs from file.
See code below
/** Title of the PDF being displayed - for tracking */
private String mTitle;
private ReaderController m_vPDF = null;
private Document m_doc = new Document();
private PDFHttpStream m_stream = new PDFHttpStream();
/** Key for retrieving the pdf URL from the intent */
public static final String KEY_PDF_URL = "KEY_PDF_URL";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Global.Init(this);
final String url = getIntent().getExtras().getString(KEY_PDF_URL);
if (url != null) {
String path = ResourceDownloadManager.getFilePathForUrl(url);
if (DebugHandler.LOG_ENABLED) {
DebugHandler.log(this, "PATH:" + Config.getSDCardPath() + " " + path);
}
m_vPDF = new ReaderController(this);
m_doc.Close();
//m_stream.open(url);
//int ret = m_doc.OpenStream(m_stream, null);
int ret = m_doc.Open(path, 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 );
}
} else {
finish();
}
mTitle = getIntent().getStringExtra(DETAIL_TO_SHOW);
getSupportActionBar().hide();
}
When I open the PDF, I see no buttons to select ink colour or save any changes. How do I enable these?