tags:

views:

39

answers:

1

what would be the best way to code an e-book library in php? how should the e-books be displayed? should the contents be generated from the database or from sources like txt or pdf? altho i'd prefer the ebooks to be displayed in html format, not pdf. are there any good online tutorials on this?

i'd appreciate your thoughts.

+1  A: 

I think you are running into problems because of your terminology, main e-book. For example, what you want to do won't work on my Kindle I expect, but do you want to do something similar to Google Books or Scribd?

Ideally you should store the content in the most flexible format you can, to have the maximum amount of information, as you can then dumb it down to the format you want to display it in.

So, you could store it as xml or LaTeX, and then if you want to convert it to pdfs, html or text you can pull arrange it as needed.

As to how to display it, that depends largely on how you want people to interact with your application.

James Black
thanks for your response. apologies for not making myself clear. yes, something similar to scribd but without using flash. some sites use frames, but i would like to avoid that.as for xml, sorry if this sounds stupid, but does this mean the e-book _content_ also has to be stored in xml?
fuz3d
@fusion - Yes, if you store the content in some flexible format then you can always remove some properties if the format being generated doesn't support it. So, text doesn't support bold, but if you store that some section is bolded then in PDFs you can have the text show up properly.
James Black