Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

support inputstream 8 years 5 months ago #9745

  • leo415
  • leo415's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
Just want to know if radaeepdf support use inputstream instead of filepath.
If support, could you give me a demo project file ?

Please Log in or Create an account to join the conversation.

support inputstream 8 years 5 months ago #9746

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
yes, I suggest you to look at PDFViewAct in the demo project, module RDPDFReader.
In the onCreate method you will find some example of how to use m_doc.OpenStream method.
For more info check this:

Please Log in or Create an account to join the conversation.

support inputstream 8 years 3 months ago #10003

  • leo415
  • leo415's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

support inputstream 8 years 3 months ago #10019

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
I have taken this code from the example project:
m_http_stream = new PDFHttpStream();
m_http_stream.open(pdf_http);
m_doc = new Document();
int ret = m_doc.OpenStream(m_http_stream, pdf_pswd);

It doesn't use any path, pdf_http it's an url.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum