- Posts: 8
- 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
Read pdf file from InputStream
9 years 11 months ago #10487
by half65
Read pdf file from InputStream was created by half65
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
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
9 years 11 months ago #10500
by Davide
Replied by Davide on topic Read pdf file from InputStream
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
For more info check this :
www.radaeepdf.com/documentation/javadocs...:A-java.lang.String-
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
Code:
m_doc.OpenMem(byte[] data, String password)
9 years 11 months ago #10503
by half65
Replied by half65 on topic Read pdf file from InputStream
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).
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).
9 years 11 months ago #10504
by Davide
Replied by Davide on topic Read pdf file from InputStream
Hi,
sorry but with our sdk you can open stream only using one of the methods I suggested you before.
sorry but with our sdk you can open stream only using one of the methods I suggested you before.
9 years 11 months ago #10516
by nermeen
Replied by nermeen on topic Read pdf file from InputStream
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?
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?
9 years 11 months ago #10523
by half65
Replied by half65 on topic Read pdf file from InputStream
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.
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.
Time to create page: 0.462 seconds