2013年9月15日星期日

Android developers achieve display Pdf file

There is a demand in the Android client to display Pdf document , initially thought the client achieve the conversion , I feel some difficulty , and decided on the server side first converted into html, then the client view .
Before using xpdf and pdftohtml, feeling the effect is not ideal , ah, I will not speak some pictures will miss is the success of converting text and pictures location is also a mess . I wonder , sourceforge.net on why many foreigners pdftohtml praise ? ? May I use the 2006 version of pdftohtml-0.39 , 2011 The latest is pdftohtml-0.40a, Is this a good point ? Maybe, I want to try , but the official did not lower down is compiled . cc file here please Which familiar linux / unix friends to help me build what can it ? pdftohtml-0.40a download address is : http://sourceforge.net/projects/pdftohtml/. Thank you first !
While feeling little hope , but still want to have a friend to help me try to compile it . Then here also would like to ask , pdf turn html, pdf turn word, pdf transfer pictures, which is easier , better some of it ?
------ Solution ---------------------------------------- ----
/ / android get an intent to open a PDF file
public static Intent getPdfFileIntent (String param) {
Intent intent = new Intent ("android.intent.action.VIEW");
intent.addCategory ("android.intent.category.DEFAULT");
intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromFile (new File (param));
intent.setDataAndType (uri, "application / pdf");
return intent;
}
------ eference ----------------------------------- ----
no one a favor it . . There are wood linux god help compile what ah !
------ eference - --------------------------------------
e .... upstairs Dude , first thank you very much pull statue behavior . Secondly, I want to emphasize that I want to achieve in my application developed in view pdf documents , instead of calling the third-party software to view oh ~
------ eference --------- ------------------------------
  The reply deleted by an administrator at 2013-04-11 08:43:17

------ eference ------------------------------------ ---
this method is not good for the Chinese to use it , I tried some full-width symbols have become a question mark ,
chart format will be confusion, not with the original file after conversion 100
% consistent .
I also do the same procedure , have not found a good way

没有评论:

发表评论