I use the below code snippet. It used file path to render pdf.
m_doc = new Document();
m_stream = new PDFFileStream();
boolean ok = m_stream.open(path);
if( !ok ) return -1;
int ret = m_doc.OpenStream(m_stream, null);
My problem is I cloud not use inputStream or byteArray to initialized PDFStream, and their is another function read(byte) looks like read byte array, but it give me a nullpointer exception because the m_impl is not initialized. I don't want to use file path to render pdf, it has performance and memory issues to me. Could you give a solution, Thanks! Waiting for your reply.