Results 1 to 15 of 15
Like Tree1Likes
  • 1 Post By lupos
  1.    #1  
    Many people have problems with the default pdf reader. Most involve the rendering speed, page turning etc. The TP does do a pretty good job of viewing web pages. After all, web pages are designed to show formatted, reflowable text and pictures. Why not convert the pdf to viewable web pages? The results are surprisingly good. The web browser does the rendering. We can gain fast rendering, pinch and zoom, indexed pages, portrait or landscape orientation and more depending on the quality of the conversion.

    One place to start is Poppler, but there are other converters available. I have converted a complicated Scientific American issue with this and it seems most pages render fine and have the gains I have previously mentioned. Since most common pdfs are not so complex, this may be enough for most needs.

    The basic procedure is convert the pdf to html, placing all results in a single folder since there can be multiple files. Copy this folder to the TP and open the main html file in the browser. In my case, 201202.pdf creates 201202.html as the main file. A preware patch that allows the browser to open local files is also needed. Use the method described in this thread, http://forums.webosnation.com/hp-tou...ml#post3173893, and Efftokar's post for a fast way to open the main file in the browser. If this proves popular, it should be relatively trivial for someone to create a reader app for these local html files.

    OPTIONAL AUTOMATIC BATCH CONVERSION (see attached files):
    The shell script convertPDF.sh will create a folder with the converted html files.
    To install, place the attached convertPDF.sh and pdfControlScript into /usr/local/bin. Make sure convertPDF.sh is executable. Run the script convertPDF.sh with the pdf file as its argument in the folder containing the pdf file to be converted. The original pdf file is retained. Note the key command used is the open source "sed" editor. It should be possible to use a form of this script on windows, though I have not tried this.

    NETWORK ACCESS (preliminary):
    Want easy local network access to these and other files? Make sure python is installed. Run the command line "python -m SimpleHTTPServer" in the folder you want to share on the sharing computer. Using the browser on the TP, enter the local IP address of this sharing computer using port 8000. As an example, enter "http://192.168.0.50:8000". This will allow you view the converted pdf files, the original pdf files, play music, view pictures etc. In short, whatever your browser can handle. You can also add a launcher to save typing for next time.

    More to come...
    Attached Files Attached Files
    Last edited by levinite; 02/15/2012 at 11:45 AM. Reason: added/updated code, wrong program link
  2. lupos's Avatar
    Posts
    276 Posts
    Global Posts
    289 Global Posts
    #2  
    i have cm9(android) installed and the kindle app for android will open pdfs. You actually have to select the file in a file explorer than when prompted choose the kindle app but it's awesome.
    Peppy431 likes this.
  3. jdale's Avatar
    Posts
    554 Posts
    Global Posts
    564 Global Posts
    #3  
    If you install this patch, the PDF reader is like a whole new program.
    [PATCH/IPK]Adobe PDF Reader Enhancements
  4.    #4  
    Maybe so, but I doubt it is anywhere near as fast and as versatile this method on the TP. If the link info is accurate, it is even possible to use your own CSS code. I am currently working on page forward and page back. Also note that the page is rendered in its own frame (a click to a new page does not require a new browser page. This method is not without issues, but it does have certain advantages. Don't knock it until you have tried it.
  5. #5  
    Quote Originally Posted by levinite View Post
    Maybe so, but I doubt it is anywhere near as fast and as versatile this method on the TP. If the link info is accurate, it is even possible to use your own CSS code. I am currently working on page forward and page back. Also note that the page is rendered in its own frame (a click to a new page does not require a new browser page. This method is not without issues, but it does have certain advantages. Don't knock it until you have tried it.
    How is it faster if you have to first convert it to HTML before you can read it? I have way too many documents to attempt that.

    If you install the mupdf render from the above mentioned post it is at least twice as fast as the stock adobe.
  6. #6  
    These patches work great!! Makes the stock PDF reader actually read PDFs!!!
  7. #7  
    Although I'll agree that the patches for the stock Adobe reader work rather well, I'll admit that this is a good proof of concept, and worth encouraging.

    Keep up the work.
  8. #8  
    Quote Originally Posted by levinite View Post
    Maybe so, but I doubt it is anywhere near as fast and as versatile this method...
    How do you know? Have you tried it?

    Quote Originally Posted by levinite View Post
    Don't knock it until you have tried it.
  9.    #9  
    I have discovered an error in the link to the program used for my conversion discussed in the original post. The correct link is Poppler. I have also corrected the original post. The version I used initially was 0.12.4, the current version is 0.18.3. Note I have not tested this new version. I apologize for any inconvenience this may have caused.
    Last edited by levinite; 01/31/2012 at 09:52 AM.
  10. #10  
    I came up with this exact thought in Sept but decided against going into messing with it.
  11.    #11  
    I have replaced the controlling code with a cleaner interface and added a goto page with display. The next step is to automate this process and finally allow the files to be selected, optionally converted and read through a network.
  12. #12  
    Thanks levinite's contribution, would like to have a try soon.
    As Im collecting HP TP rips, such as have just found a list of "Top HP TouchPad Apps You must Have" from Aneesoft, cool, cheers!
  13. noseph's Avatar
    Posts
    727 Posts
    Global Posts
    775 Global Posts
    #13  
    Quote Originally Posted by Jane66 View Post
    Thanks levinite's contribution, would like to have a try soon.
    As Im collecting HP TP rips, such as have just found a list of "Top HP TouchPad Apps You must Have" from Aneesoft, cool, cheers!
    Do not forget http://forums.webosnation.com/hp-tou...ml#post3041368
    Quidquid Latine dictum sit, altum sonatur.

    Palm III -> Palm V -> Viewsonic Pocket PC V36 -> Treo 650 -> Samsung i760 ->
    Palm Pre Plus -> Palm Pre 2 > Samsung Galaxy Nexus & HP TouchPad

    Android 4.1 - Samsung Galaxy Nexus
    CM9 Alpha 2 Official Nightly w/WebCM9 0.4 - HP TouchPad

    Twitter: @noseph47
  14. #14  
    The best way to read pdf imo is using cm9. The webos app is so barebone and slow.
    That is true but this thread is about how to do it in WebOS.
    Last edited by HelloNNNewman; 02/22/2012 at 03:47 PM. Reason: removed banned member
  15.    #15  
    I have added a script to automatically convert the pdf file into a folder containing the html files. Although this is a linux script, since it primarily uses the open source "sed" editor, it could probably be modified for windows or mac. Also, I have added an easy method to allow local network access to browser compatible file types including pdf, music, video etc. See the original post.

Tags for this Thread

Posting Permissions