View PDF, Full Resolution Photo, and More on the iPhone

One of the feature I really like to have on my iPhone is the ability to ready any PDF documents without network connection(Edge/Wifi whatsoever), as well as view full resolution photos. Since the built-in Safari on the iPhone is already capable of viewing full resolution photos and PDFs, I thought installing a local http server would allow me to do what I wanted. The advantage of doing it this way is that I can view whatever I want in both landscape and portrait mode.

So I installed lighttpd from Installer.app. It will create a folder at

/var/root/Sites

which will be the root of the server. The default configuration had directory listing disabled which is good for security. But just to be more security, I changed a line in the config file of lighttpd located at

/usr/local/etc/lighttpd.conf

I changed the line number 3 from

# server.bind = "127.0.0.1" # Default: All

to

server.bind = "127.0.0.1" # Default: All

Now my iPhone http server can only be visited from the iPhone itself!

Anyway, I created a folder called “pdf” and put a 300 page textbook in there. Then I launch the built-in Safari and navigate to

http://127.0.0.1/pdf/textbook.pdf

and there we go — PDF without needing network connection.

Post a Comment