How to pass a asset file path in PDFReaderAct - 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: How to pass a asset file path in PDFReaderAct

How to pass a asset file path in PDFReaderAct 3 years 10 months ago #6363

  • biplab2014
  • biplab2014's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi,

I want to get all the action is there in PDFReaderAct class. So how to pass a path for a pdf which is in android asset folder.

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

How to pass a asset file path in PDFReaderAct 3 years 10 months ago #6364

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 830
  • Karma: 43
  • Thank you received: 10
declare member like this:
private PDFAssetStream stream = new PDFAssetStream();

and then:
stream.open(getAssets(), "test.PDF");
int ret = doc.OpenStream(stream, null);
switch( ret ) ...

when document closed, you shall:
if( stream != null )
{
stream.close();
stream = null;
}

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

How to pass a asset file path in PDFReaderAct 3 years 10 months ago #6365

  • biplab2014
  • biplab2014's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
this is not working. Crashing the application. Can i get the hole code with same function which is available in PDFReaderAct.

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

How to pass a asset file path in PDFReaderAct 3 years 2 months ago #8365

  • efren
  • efren's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
someone has this solution....?

my app crash after I call
doc.OpenStream(stream, password);

Why this is happening...?
If I open the same PDF from sdcard, it open normally

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

Last Edit: by efren.
  • Page:
  • 1
Powered by Kunena Forum