Also took the opportunity to pull out the PDF types into their own file to clear up `Page.ts` slightly and give the PDF code a more natural place to live.