TODOs: - Documentation. - Error handling for invalid type. - Infer text stream by clustering. - Support writing/creating PDFs. - Any special treatments for linearized PDFs?