The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Native iPhone / iPod Touch App Launches
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-08-2007, 02:04 PM
Developer
 
Join Date: Jul 2007
Posts: 111
Thanks: 0
Thanked 31 Times in 29 Posts
apache and safari as PDF ebook reader

I have been looking for an ebook reader that recognizes PDF ebooks. Books.app doesn't seem to and I can't get mobilepreview to see them either. As a workaround I'm using apache and safari.

Basically, install apache from installer.app
It will make a folder called Library/Webserver/documents
Put folder of PDF ebooks in there.
Point safari to 127.0.0.1/(your folder name)/
You get a directory listing of folder contents.
Click on any PDF and it will open in safari complete with zooming, rotation capabilities, graphics & page numbers...etc
Wonky but it works.

I would rather use a designated PDF reader so if anyone knows of one please let me know.

Additionally - if anyone knows of another way for Safari to read local files, that would work too.

Greg

Last edited by hartsteins; 09-08-2007 at 05:36 PM.. Reason: addition
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to hartsteins For This Useful Post:
thinkfast (11-08-2007)
  #2  
Old 09-08-2007, 05:48 PM
Green Apple
 
Join Date: Aug 2007
Posts: 59
Thanks: 1
Thanked 8 Times in 5 Posts

could you use that method to store web apps locally? because that would be amazing....
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 11-08-2007, 07:39 PM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts

Many Thanks.

Your Apache webserver idea also solves my need to view images at a higher res than the standard photo viewer on the itouch supports, and in regard to brett's question, it appears to be able to fully function as a webserver. Anyone else see the potential here?! For my needs I can see building my own web-based (but hosted on the ipod touch itself) photo management system that is totally customized to my own liking. Amazing indeed.

Mel
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 11-09-2007, 12:34 AM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 8
Thanks: 0
Thanked 3 Times in 2 Posts

Given the resource constraints of the iPhone, I would think that lighttpd is a better choice. I configured mine with a custom PHP directory listing script and corresponding CSS sheet to look more standardized.
Attached Thumbnails
apache and safari as PDF ebook reader-img_9000.png  
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to DeathPrawn For This Useful Post:
thinkfast (11-09-2007)
  #5  
Old 11-09-2007, 11:24 AM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts

Looks nice. Would you mind sharing the code?

Mel

Just tried the lighttpd. It is much better performing. Thanks. I was having trouble with large pdf's freezing for up to a minute before, problem gone.

Mel

Last edited by thinkfast; 11-09-2007 at 11:24 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 11-09-2007, 12:37 PM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 8
Thanks: 0
Thanked 3 Times in 2 Posts

I've attached the PHP, CSS, and image files. Throw 'em all into a folder called .dirlist at the root of the site folder - you can change it, but be sure to change all references in the PHP, CSS, and lighttpd.conf files.

You also need to make the following changes to your lighttpd.conf (this is assuming you already have both directory listing and PHP set up properly):
- add "mod_indexfile" to the list of server modules, separated by a comma
- add the line 'index-file.names = ( "/.dirlist/dir-generator.php" )' (change if you want to keep it somewhere else).

load/unload lighttpd, and it should work!
Attached Files
File Type: zip Dir-Generator.zip (3.2 KB, 176 views)

Last edited by DeathPrawn; 11-09-2007 at 08:43 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 2 Users Say Thank You to DeathPrawn For This Useful Post:
-V-O-Y-A-G-E-R- (03-05-2008), DaveiPhone (11-09-2007)
  #7  
Old 11-09-2007, 03:37 PM
HelioPause's Avatar
What's Jailbreak?
 
Join Date: Oct 2007
Posts: 24
Thanks: 2
Thanked 3 Times in 3 Posts

Is there maybe an...easier way...of reading PDF's on the iPhone?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #8  
Old 11-09-2007, 06:18 PM
iPhoneaholic
 
Join Date: Sep 2007
Device + Firmware: iPhone 3GS, 3G & 2G
Operating System: OSX 10.5.x & Windows XP
Posts: 363
Thanks: 14
Thanked 63 Times in 52 Posts

DeathPrawn, thanks much for posting that! This is a slick solution and works great, although as a newbie to lighttpd and PHP, it took a little bit for me to figure out how to make it work.

Even though this shows off my extreme ignorance, maybe others will benefit by my explaining the steps that slowed me down:

First, I had to figure out that PHP was a separate installation! Yes, I said I'm a newbie. When you install PHP, you get this message: "Please add /opt/iphone/bin/ to your $PATH", but it did actually did that automatically.

Next I needed to locate the lighttpd.conf file so I could modify it. It's here:
/usr/local/etc/lighttpd.conf

In addition to the changes you noted, I also had to add in cgi.assign array, this to the end : , ".php" => "/opt/iphone/bin/php-cgi"

After that (and following all DeathPrawn's instructions), it worked like a treat!

All hail DeathPrawn!! Really nice, thanks again.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #9  
Old 11-17-2007, 08:18 AM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Q

I install apache and then open to safari and type in the web address where I get a message from apache saying software successfully installed.

I then use mobile finder to navigate to library but there is no WebServer folder and I can't find any file called index.html

Am i supposed to create the webserver and documents folders manually?

any help appreciated

No worries figure it out but safari doesn't seem to be able to open all PDFs, sometimes it just gives a grey page.

Last edited by bobjames; 11-17-2007 at 08:18 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #10  
Old 11-17-2007, 04:28 PM
What's Jailbreak?
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Guys, I tried this lighttpd way but I don't know what to key in Safari window in order to go to that view DeathPrawn posted. Can u try and do a step by step little guide as I might have put a line at the wrong place in lighttpd.conf.

Also is there a way not to have space problems when uploading pdf boooks?

Thanx in advance...
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 01-29-2008, 09:53 AM
What's Jailbreak?
 
Join Date: Jan 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

it works great .... it's so much easier to read a pdf/txt in safari than in any pdf readear or books ... large files one fast, you can play with landscape and portrait ....

one single problem: maybe you guys can help me!?

when in offline mode, i can't use safari! ... i get the "safari can't open the page because it can't find the server." message ....

but these files are local files ....

is there a trick that can be done?!

Thanx!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #12  
Old 01-29-2008, 10:15 AM
Eurisko's Avatar
Livin the iPhone Life
 
Join Date: Aug 2007
Device + Firmware: 3G iPhone, FW3.0
Operating System: OSX Leopard
Location: Toronto, Canada
Posts: 3,312
Thanks: 11
Thanked 554 Times in 482 Posts
Send a message via Yahoo to Eurisko

Quote:
Originally Posted by brettt View Post
could you use that method to store web apps locally? because that would be amazing....
Yes, I've been doing that for while. You can store entire websites locally and access them via Safari. I mainly store games, and information sites.

Books.app only reads Txt and HTML. If you want a PDF Reader you can get one through the installer. It's called PDFViewer, available through Conceited's Installer Repository.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #13  
Old 01-29-2008, 11:24 AM
What's Jailbreak?
 
Join Date: Jan 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

"when in offline mode, i can't use safari! ... i get the "safari can't open the page because it can't find the server." message ....

but these files are local files ....

is there a trick that can be done?!"

i found the problem .... http://localhost works when edge, wifi are active ... but not in offline mode ....127.0.0.1 works all the time ....
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #14  
Old 01-29-2008, 11:25 AM
What's Jailbreak?
 
Join Date: Jan 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

"when in offline mode, i can't use safari! ... i get the "safari can't open the page because it can't find the server." message ....

but these files are local files ....

is there a trick that can be done?!"

i found the problem .... http://localhost works when edge, wifi are active ... but not in offline mode ....127.0.0.1 works all the time ....
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #15  
Old 02-02-2008, 05:06 PM
Green Apple
 
Join Date: Jan 2008
Posts: 87
Thanks: 3
Thanked 18 Times in 13 Posts

Ok, I have everything setup as per the instructions here. When I go to 127.0.0.1 I just get a 'Hello Web' iPod. When I go to 127.0.0.1/.dirlist/ I can see the contents of the folder and if I try 127.0.0.1/.dirlist/dir-generator.php it says Errorrr. I can put PDFs into a folder called PDF inside of .dirlist/ and I can view them in Safari as intended but I am not getting the benefit of the .php and .css style sheet. What am I doing wrong?

Last edited by 4nic8tor; 02-02-2008 at 05:13 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Native iPhone / iPod Touch App Launches

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 04:24 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top