RadaeePDF.com :: Topic: How to pass a asset file path in PDFReaderAct (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: How to pass a asset file path in PDFReaderAct

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

  • biplab2014
  • biplab2014's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 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.
The administrator has disabled public write access.

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

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
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;
}
The administrator has disabled public write access.

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

  • biplab2014
  • biplab2014's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
this is not working. Crashing the application. Can i get the hole code with same function which is available in PDFReaderAct.
The administrator has disabled public write access.

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

  • efren
  • efren's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 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
Last Edit: 2 years 7 months ago by efren.
The administrator has disabled public write access.
Powered by Kunena Forum