Function pdfshrink::pdf_to_cmp_pdf [−][src]
pub fn pdf_to_cmp_pdf<P>(inpath: P) -> Option<PathBuf> where
P: AsRef<Path>,
Replaces a .pdf
extension with .cmp.pdf
.
If there is no extension, or the extension is not .pdf
, returns None
.
Examples
let before = "some dir/subdir/name.pdf"; let after = "some dir/subdir/name.cmp.pdf"; assert_eq!(pdf_to_cmp_pdf(before), Some(after.into()));