The PDF spec is rather long but the basic format is simple enough. Check out <a href="http://yob.id.au/2009/11/12/intro-to-the-pdf-file-structure.html" rel="nofollow">http://yob.id.au/2009/11/12/intro-to-the-pdf-file-structure....</a> for a short intro.