1

I want to be able to read a file hosted online in my android application. The google docs pdf viewers are effective but do not provide a good experience. The PDFViewer jar for opening the file works well for files offline but does not seem to be working for online files. Any sample which shows this.

For reading from SD card, I have found this sample to be very effective [Example of code to implement a PDF reader

Thanks

Community
  • 1
  • 1
Sharadn
  • 9
  • 4

1 Answers1

1

There is a pdf viewer that's working well in this case, it's RadaeePDF

To open a pdf from remote url:

Global.Init( this );
PDFHttpStream m_stream = new PDFHttpStream();
Document m_doc = new Document();
ReaderController m_vPDF = new ReaderController(this);
m_doc.Close();
m_stream.open("http://server/filename.pdf");
int ret = m_doc.OpenStream(m_stream, null);
if( ret == 0 ) {
   m_vPDF.open(m_doc);
   setContentView( m_vPDF );
}
Nermeen
  • 15,883
  • 5
  • 59
  • 72