Jump to content
saeedbay

how can i create pdf report or picture report for android device

Recommended Posts

i used tms for creating pdf in document folder of device

but how can i  open and show that pdf file in pdf reader applications?

Share this post


Link to post

First :

fDocPDF.BeginDocument(FileName);//where filename is the name of the pdf file

 

Second :

fDocPDF.EndDocument(true);

Share this post


Link to post

this command works only on windows but in android not work

Edited by saeedbay

Share this post


Link to post

i dolved problem with intent

 

      URI := TJnet_Uri.JavaClass.parse(StringToJString('content:///' + TPath.GetDocumentsPath + PathDelim + AFileName));
      intent := TJIntent.Create;
      intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
      intent.setDataAndType(URI,StringToJString('application/pdf'));
      SharedActivity.startActivity(intent);

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×