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

TOPIC:

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

  • biplab2014
  • biplab2014's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 9 years 10 months ago #6364

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
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 9 years 10 months ago #6365

  • biplab2014
  • biplab2014's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 9 years 2 months ago #8365

  • efren
  • efren's Avatar
  • Offline
  • New Member
  • New Member
  • 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