- Posts: 4
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
support inputstream
10 years 10 months ago #9745
by leo415
support inputstream was created by leo415
Just want to know if radaeepdf support use inputstream instead of filepath.
If support, could you give me a demo project file ?
If support, could you give me a demo project file ?
10 years 10 months ago #9746
by Davide
Replied by Davide on topic support inputstream
10 years 8 months ago #10003
by leo415
Replied by leo415 on topic support inputstream
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.
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.
10 years 8 months ago #10019
by Davide
Replied by Davide on topic support inputstream
Hi,
I have taken this code from the example project:
It doesn't use any path, pdf_http it's an url.
I have taken this code from the example project:
Code:
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.
Time to create page: 0.409 seconds