Tutorial: Viewing local PDFs on Safari effectively

Discussion in 'iOS Jailbreak & Cydia' started by michaelchan0427, Oct 17, 2007.

  1. michaelchan0427

    michaelchan0427 New Member

    Joined:
    Sep 30, 2007
    Messages:
    122
    Likes Received:
    0
    This tutorial aims to provide readers an effective way to view local PDFs on Safari. In this tutorial, we will setup a web server, and modify a configuration file.

    Required packages / apps:

    1. Ulctl
    2. lighttpd

    All available via installer.app


    The tutorial:

    1. Install lighttpd & Ulctl

    2. Use ftp to download the lighttpd configuration file (lighttpd.conf) from /usr/local/etc from your ipod

    3. Add the following line after the line : server.errorlog = "/var/log/lighttpd/error.log"

    Code:
    dir-listing.activate = "enable"
    4. Upload the edited lighttpd.conf back to /usr/local/etc to your ipod

    5. Remove all files inside /var/root/Sites on your ipod

    6. Upload a pdf to /var/root/Sites on your ipod

    7. Open safari go to 127.0.0.1 and you will see a listing of your pdf


    Note: You can also organize your pdfs into folders, when you upload a folder to /var/root/Sites, the folder will also be listed when visit 127.0.0.1


    Please reply if you find this useful, and can someone make this thread sticky?
  2. yenlung

    yenlung New Member

    Joined:
    Oct 20, 2007
    Messages:
    2
    Likes Received:
    0
    Great! I think this might be the best way to view PDF files on an iPod touch by now.
  3. goundry

    goundry New Member

    Joined:
    Oct 11, 2007
    Messages:
    28
    Likes Received:
    0
    This is excellent. I was meaning to find that config file and enable dir listing.

    PS - This of course works for all types of docs including Microsoft Excel, Word, etc - as Safari has a built in viewer for all of these. I use Safari to view word docs on the move

    Please Register or Log in to view images

  4. goundry

    goundry New Member

    Joined:
    Oct 11, 2007
    Messages:
    28
    Likes Received:
    0
    Oh, and if you setup the iPod Finder to sync to this Sites directory from another on a server, you can easily sync data to view on the move. Very nifty
  5. RazerM

    RazerM New Member

    Joined:
    Oct 4, 2007
    Messages:
    279
    Likes Received:
    5
    Thanks for the tutorial, it works great.
  6. n3l619

    n3l619 New Member

    Joined:
    Sep 26, 2007
    Messages:
    40
    Likes Received:
    0
    ok i got it to work perfectly
    but what is Ulctl for
  7. eddy1103

    eddy1103 New Member

    Joined:
    Oct 17, 2007
    Messages:
    87
    Likes Received:
    0
    Is it the same idea as the solution with Apache ?

    For me, the Apache solution works great and without editing any file.
  8. elfusca

    elfusca New Member

    Joined:
    Sep 21, 2007
    Messages:
    50
    Likes Received:
    0
    I wanted to ask just the same like eddy1103.
  9. yenlung

    yenlung New Member

    Joined:
    Oct 20, 2007
    Messages:
    2
    Likes Received:
    0
    You don't really need UIctl in this case, but UIctl provide a simple way to enable or disable your webserver (lighttpd).
  10. itouch101

    itouch101 New Member

    Joined:
    Oct 6, 2007
    Messages:
    286
    Likes Received:
    0
    I'm just using Apache and it works just as good -_^

Share This Page