The TimetableTag is the best way to render a timetable, either in HTML or PDF.
Download from SourceForge
Look at and play with it