Printing pdf file from network shared printer in android -


i have pdf file stored on sd card named "test.pdf". have opened file in application using following code:

         b.setonclicklistener(new view.onclicklistener() {      @override     public void onclick(view v) {         // todo auto-generated method stub         file file = new file(environment.getexternalstoragedirectory().getabsolutepath() +"/"+ "test.pdf");         intent target = new intent(intent.action_view);         target.setdataandtype(uri.fromfile(file),"application/pdf");         target.setflags(intent.flag_activity_no_history);          intent intent = intent.createchooser(target, "open file");         try {             startactivity(intent);         } catch (activitynotfoundexception e) {             // instruct user install pdf reader here, or             toast.maketext(getapplicationcontext(), "not found", toast.length_short).show();         }       } }); 

pdf displayed inside application. want print pdf file using shared printer. how can that?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -