Adds PDF support, keeps broken DOC support code