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

TOPIC:

Read pdf file from InputStream 9 years 3 weeks ago #10487

  • half65
  • half65's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello,

How I can read pdf file from InputStream directly?
I tried to use my own wrapper that implements PDFStream but nothing.
By the way, InputStream from getAssets() working good. If I'm trying to use another streams -- still getting an error "Open Failed: Damaged or Invalid PDF file"

Please help me

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

Read pdf file from InputStream 9 years 3 weeks ago #10500

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
please check PDFSimple class from RDPDFReader module, go to Open method, here you will find an example of open file from InputStream.
Check PDFFileStream class.

You can also try with
m_doc.OpenMem(byte[] data, String password)
For more info check this : www.radaeepdf.com/documentation/javadocs...:A-java.lang.String-

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

Read pdf file from InputStream 9 years 3 weeks ago #10503

  • half65
  • half65's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hi,

I've checked code with PDFStream and PDFFileStream classes. I want to open file from InputStream directly (using ZipInputStream) but not from file/buffer. Also I think that we can use only "seekable' streams (with reset(), skip() and markSupported() flag).

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

Read pdf file from InputStream 9 years 3 weeks ago #10504

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
sorry but with our sdk you can open stream only using one of the methods I suggested you before.

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

Read pdf file from InputStream 9 years 2 weeks ago #10516

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Hi,

What you need to do, is to create you own class that implements PDFStream in that class you can use your input stream..and pass your class to m_doc.OpenStream

What problems did you face while implementing this behavior?

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

Read pdf file from InputStream 9 years 2 weeks ago #10523

  • half65
  • half65's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hi,

Yes, As I wrote before, I've created my own class that implements PDFStream (similar to PDFAssetStream). And unfortunately my source stream can't support skip() and reset() methods -- they raises IOException. By the way, main task is opening PDF from InputStream from ZIP archive directly.

Tnahks.

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

  • Page:
  • 1
Powered by Kunena Forum