support inputstream - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: support inputstream

support inputstream 3 years 2 weeks ago #9745

  • leo415
  • leo415's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 3 years 2 weeks ago #9746

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • 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: http://www.radaeepdf.com/documentation/javadocs/com/radaee/pdf/Document.html#OpenStream(com.radaee.pdf.Document.PDFStream, java.lang.String)

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

support inputstream 2 years 10 months ago #10003

  • leo415
  • leo415's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 2 years 10 months ago #10019

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • 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